Published
pg-jev puts prompt_jev() in PostgreSQL and returns jsonb
Jose Mejias posted mejiasd3v/pg-jev, an MIT extension. prompt_jev sends text to Jev from SQL and returns a probability, a choice, or a score as jsonb. The README we read has no accuracy or latency table. Calls are not batched across rows.
Jose Mejias posted mejiasd3v/pg-jev on September 22. The line in the post is SELECT prompt_jev(message, 'Does this ask for a refund?'). The repository is MIT. The extension is pg_prompt_jev. It needs PostgreSQL with plpython3u and a path out to HTTPS. The README says CI covers PostgreSQL 14 through 18.
prompt_jev takes the row text and a question. A noul comes back as a probability. A choice takes a jsonb list of labels. A score takes an ordered list. Several questions can ride in one request under a questions argument. Every mode returns jsonb, because PostgreSQL wants one return type. The README’s sample choice, presented as an illustration, is billing at 0.94, technical at 0.04, sales at 0.02, confidence 0.91. That block is not described as a measured set.
The function keeps a six-argument signature. It is VOLATILE, PARALLEL UNSAFE, security invoker, and not STRICT. Public execution is revoked, because the inputs leave the database. NULL text returns NULL and does not validate the other arguments or call the API. Each non-null call does the HTTP work inside the current statement. A rollback cannot pull back data already sent, or the charge. EXPLAIN ANALYZE can fire requests. Rows are not batched: one call per row, unless the caller packs several questions about the same text into one request. The operations note says to filter the candidate rows first and to store answers that will be reused.
Three providers are named. TypeSafe is the default, with TYPESAFE_API_KEY and an optional TYPESAFE_DEFAULT_MODEL. Vercel AI Gateway and Cloudflare AI Gateway have their own environment variables. For a local session the README shows SET jev.provider and SET jev.api_key, and it says not to persist keys with ALTER SYSTEM. Server environment values take precedence. Ordinary tests use a synthetic loopback provider. make integration installs into PostgreSQL 18 in Docker. We did not run either target.
MotherDuck’s prompt_jev() is the hosted SQL function with a printed accuracy table: 89% on 100,000 AG News training rows, 40 seconds, $0.50. duckdb-jev published throughput, 2,049 rows in 0.887 seconds, on twelve ticket templates. Jevflake asks from Snowflake. pg-jev is the PostgreSQL entry, and the README we read does not add a score or a clock to that list.
This site's reading
Editorial notes evaluating claims against primary sources, contextualizing findings alongside related implementations, and defining technical terms.
Verify
Primary post is @MejiasDev, September 22, 2026, 13:43 UTC. The example in the post is SELECT prompt_jev(message, 'Does this ask for a refund?'). The repo is mejiasd3v/pg-jev, MIT. Extension name pg_prompt_jev. It requires plpython3u and outbound HTTPS. CI is described as PostgreSQL 14 through 18. The function signature has six arguments, is VOLATILE, PARALLEL UNSAFE, security invoker, and not STRICT. Public execution is revoked. Providers in the README: TypeSafe by default via TYPESAFE_API_KEY, Vercel AI Gateway, and Cloudflare AI Gateway. Session settings exist for local tests. The README says not to persist API keys with ALTER SYSTEM, and that server environment values win over session settings. NULL input returns NULL and does not call the API. A rollback cannot retract data already sent or the provider cost. EXPLAIN ANALYZE can make requests. Calls are not batched across rows. An illustrated choice result in the README is billing 0.94, technical 0.04, sales 0.02, confidence 0.91. No row count, accuracy, or timing table is in the README we read. We did not install the extension.
Compare
MotherDuck's prompt_jev() is a paid warehouse function with an AG News table: 100,000 training rows, 89%, 40 seconds, $0.50. duckdb-jev published a live Choice throughput figure, 2,049 rows in 0.887 seconds, on twelve ticket templates. Jevflake stores answers from Snowflake SQL. pg-jev is a PostgreSQL extension on the same idea and does not print a scored set. All four send row text to a provider.
Terms
- prompt_jev
- In mejiasd3v/pg-jev, a PostgreSQL function that sends text and typed questions to Jev and returns jsonb. The README's modes are a noul probability, a choice, a score, or several questions in one request.
- plpython3u
- The untrusted Python language PostgreSQL needs for this extension. The README says the function performs external HTTPS work inside the statement, and that a rollback does not undo a request already sent.