postgresql pg-datahike 0.1 — PostgreSQL wire protocol + SQL translator for Datahike
Datahike now speaks Postgres. Point any PG client (pgjdbc, psql, psycopg2, Hibernate, SQLAlchemy,) at a Datahike connection and it just works. Bidirectional at the datom layer — CREATE TABLE over pgwire transacts normal Datahike schemas + datoms; existing Datahike databases become SQL-queryable with zero setup; (d/q …) and SELECT * FROM person see the same rows.
Four capabilities on top of plain SQL:
• Multi-DB routing — jdbc: picks the conn from a {name → conn} registry
• Schema hints — : meta-attrs rename columns, hide attrs, mark FK targets on existing Datahike schemas
• Temporal SET — SET exposes d/as-of / d/since / d/history as session vars
• Git-like branching — SELECT datahike.create_branch('feat', 'main') is O(1), no provisioning; SET datahike.branch = 'feat'; SET datahike.commit_id = '<uuid>' queries an exact historical commit (no other PG-compatible database offers that)
Verified end-to-end: pgjdbc ResultSetTest 80/80, Hibernate DatahikeHibernateTest 13/13, SQLAlchemy 7-phase 16/16, Odoo 19 module boot + TestORM.
clojure
{:deps {org.replikativ/datahike {:mvn/version "LATEST"}
org.replikativ/pg-datahike {:mvn/version "LATEST"}}}
EPL 2.0 · <https://github.com/replikativ/pg-datahike>
This is a first release. Feedback welcome, in particular whether there are specific applications of interest.