HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
dmagda
pg-compute-node
JavaScript2023–2023
dmagda / pg-compute-node

pg-compute-node

A client-side PostgreSQL extension that lets you execute JavaScript functions on the database directly from the application logic.

2Distinct people
3Mentions
0Explicit recommenders
28GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A client-side PostgreSQL extension that lets you execute JavaScript functions on the database directly from the application logic.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:24:10 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by hour3 dated mentions

Observed mentions: 2023-09-07 16:20:06 UTC to 2023-09-07 16:46:50 UTC.

01232023-09-07 16:00:00 UTC to 2023-09-07 17:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 commentsSep 7, 16:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC. One observed period does not establish a trend.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Sep 7, 16:002023-09-07 16:00:00 UTC2023-09-07 17:00:00 UTC303

What Hacker News says

3 sources
Nice, thanks for catching the issue! https://github.com/dmagda/pg-compute-node/issues/5 This extension is primaraly for those who avoid using database functions at all because of not-the-best dev experience. Once your plv8 function is ready & tested, then it's totally fine to create it once and execute using a DB driver. However, while in development you might need to change the function implementation several times (or you might need to update it after going to prod) and, personally, it's easier to do this from within your IDE. Anyway, those who prefer create functions manually can take advantage of the MANUAL deployment mode: https://github.com/dmagda/pg-compute-node/blob/main/compute/...
In PgCompute: New PostgreSQL Client-Side Extension for Database Functions
Thank you for feedback. Sharing a bit more details to make things clearer. Upon a function invocation, PgCompute does the following: 1. Constructs a function signature (name + arguments) and checks if the function was invoked before. (there is a deploymentTable object that tracks functions that were already sent and executed on the database: https://github.com/dmagda/pg-compute-node/blob/main/compute/...) 2. If the function already exists on the database and its implementation is NOT changed, then PgCompute just sends the function signature to the database for the execution using the `select + schema + "." + funcName + "(" + argsStr + ") statement`. 3. If the function has never been executed or its implementation is changed, then the function is first deployed/created on the database end and then executed. JS allows you to capture the fun
Read the rest
ction body as text and send it over whenever you like. PgCompute uses the `create or replace function " + this.#schema + "." + funcName + "()...` statemet to deploy the function. The transitively invoked functions should work if you execute functionA first via PgCompute and then execute functionB that calls functionA. But I still need to check this. As for the scope of supported JS APIs, presently the functions have to use the APIs that are allowed/supported by plv8.
In PgCompute: New PostgreSQL Client-Side Extension for Database Functions

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.