Credentials. The provider key and the SQL logins for analysts are configured on the database server, so restrict who can read the server environment and the configuration file.
Who it is forA data engineer on a Linux PostgreSQL 17 server who wants semantic filters inside SQL clients without running a Python service.
The problemTeams that work only in SQL editors have no way to add semantic judgments without a separate application layer.
The outcomeA SQL query that uses jev_native.scan to group and count rows by semantic judgment, with PostgreSQL handling the grouping.
What you need first
- Python 3.11+ and Docker with Compose v2
- A TypeSafe key or other JEV provider settings
- A CSV export or an existing PostgreSQL table to query
Steps
- Run
git clone --branch v0.7.0 https://github.com/Sheltercosmo/jev4pg.gitand thencd jev4pg. - Follow the [build and install the extension files](native/README.md#build) instructions, and configure the provider through
JEV_NATIVE_CONFIG_FILEin the PostgreSQL server environment. - In your target database, run
CREATE EXTENSION jev_native;. - As an administrator, run
GRANT USAGE ON SCHEMA jev_native, business TO analyst;,GRANT EXECUTE ON FUNCTION jev_native.scan(text,jsonb,jsonb) TO analyst;andGRANT SELECT ON business.tickets TO analyst;. - Connect with psql as
analystand run a SELECT that callsjev_native.scanonbusiness.tickets, grouping the results by product.
Prompt for your agent
Use the jev4pg repository to install the jev_native extension on a PostgreSQL 17 server and grant access to a SQL login named <login> for the table <schema>.<table>. Return a grouped query over jev_native.scan and confirm that the result includes decision states and uncertainty for each row.
Caveat. The native extension is a 0.2.0 preview, and the README lists native maintained-feature refresh and semantic write review as roadmap items that are not yet available.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for Sheltercosmo/jev4pg and "Query semantic conditions directly from psql with native functions"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer