DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to query semantic conditions directly from psql with native functions with Jev4pg

Call jev_native functions from any PostgreSQL client against tables you already own.

Short answer: Run git clone --branch v0.7.0 https://github.com/Sheltercosmo/jev4pg.git and then cd jev4pg; then follow the [build and install the extension files](native/README.md#build) instructions, and configure the provider through JEV_NATIVE_CONFIG_FILE in the PostgreSQL server environment; in your target database, run CREATE EXTENSION jev_native;. All steps.

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

  1. Run git clone --branch v0.7.0 https://github.com/Sheltercosmo/jev4pg.git and then cd jev4pg.
  2. Follow the [build and install the extension files](native/README.md#build) instructions, and configure the provider through JEV_NATIVE_CONFIG_FILE in the PostgreSQL server environment.
  3. In your target database, run CREATE EXTENSION jev_native;.
  4. 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; and GRANT SELECT ON business.tickets TO analyst;.
  5. Connect with psql as analyst and run a SELECT that calls jev_native.scan on business.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

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer