PostgreSQL 18 SQL dialect compatibility through ADBC¶
Target selected on 2026-11-09; tracked in
#118. This is a working
inventory at source revision 08d75d50888374b805a5c89f5bb94a46cf6fe8a9, not a
claim of complete compatibility. It replaces the proposed SQL:2023 Core audit
as the objective for this change. Standards extensions #356–#358 remain separate.
Proposed query-profile milestone¶
The proposed PostgreSQL 18 query profile defines the contract, manifest, exclusions and completion evidence needed for a smaller, versioned query-compatibility claim through ADBC. It also groups all 77 measured failures by category and owner, separately from their standards classification. No complete profile has yet been published or passed. The current mixed 655-case corpus and #359's closed triage do not establish that milestone. The broader #118 objective and deferred feature issues remain open.
Existing resources and their limits¶
- PostgreSQL publishes 18's regression suites, covering standard SQL and PostgreSQL extensions. Reuse relevant SQL inputs; record adaptations and omissions for psql, server internals, extensions, and protocol-specific tests. Running them through ADBC requires a suitable harness.
- PostgreSQL's feature table
is a standards-support inventory. Its
is_verified_bycolumn is always null because PostgreSQL does not formally test feature conformance. - sqllogictest checks query answers; its documented scope excludes transactional behavior, concurrency, and locking. It can supplement a query corpus, not replace those checks or establish SQL:2023 conformance.
- The existing ADBC differential harness compares results, physical Arrow types, and SQLSTATEs. It now selects PostgreSQL 18.6. Its curated PostgreSQL inputs and captured import oracle retain REL_16_15 provenance; this is not an import of the PostgreSQL 18 regression suite.
Initial source audit¶
“Present, unverified” means related implementation and tests exist; it does not mean the complete area matches PostgreSQL 18. “Gap” describes a directly visible implementation limitation. Existing tests listed here are candidate evidence, not a statement that they have been rerun against PostgreSQL 18.
| Area | Initial assessment | Source and candidate evidence |
|---|---|---|
| SELECT, expressions, joins, subqueries | Present, unverified | parser, query execution, SQL tests, query forms |
| Aggregation and set operations | Present, unverified | aggregates, set operations, aggregate tests |
| Numeric, string, date/time and NULL semantics | Present, unverified | types, evaluator, scalar tests, datetime precision tests |
| DDL, schemas, views and dependencies | Present with gaps; unverified overall | parser, views, drop behavior; CREATE VIEW parsing does not implement WITH CHECK OPTION |
| INSERT/UPDATE/DELETE/MERGE and defaults | Present, unverified | DML, defaults, default tests, SQL integration tests |
| Integrity constraints | Gap | primary keys retain metadata and imply NOT NULL but do not enforce uniqueness; REFERENCES parsing discards foreign-key definitions; constraint tests |
| Transactions and isolation | Gap | connection rejects disabling autocommit and explicit ADBC Commit/Rollback; session control accepts SQL transaction controls without data rollback; statement snapshots do not establish multi-statement transaction compatibility |
| Privileges | Partial SQL surface | privilege parser supports only table SELECT grants/revokes to provisioned roles; tests reject grant options, column grants and other forms; RBAC contract |
| SQL cursors and row locking | Gap requiring scope/design decisions | statement dispatch lacks DECLARE/OPEN/CLOSE cursor statements; Search cursors and Arrow streaming are not SQL cursor semantics; row-locking work is #116 |
| Information schema and pg_catalog | Present subset, unverified | information schema, pg_catalog, metadata tests; view names alone do not prove standard or PostgreSQL column/visibility semantics |
| Parameters, Arrow schemas, fetch and errors | Present, unverified against 18 | parameters, Arrow conversion, SQLSTATE mapping, runner |
| Procedures, triggers, protocol and other exclusions | Explicitly scoped in #118 | Preserve the tracker's exclusions. An excluded feature must qualify any compatibility claim; it is not a passing case. |
Completion evidence¶
- Pin the PostgreSQL server image and upstream regression source separately. Capture actual server version, locale, encoding, time zone and session setup.
- For each supported SQL form, map stable test IDs to its semantics: results, types, NULLs, ordering, errors, parameters, metadata and relevant concurrency.
- Import relevant PostgreSQL 18 SQL with its license, hashes and adaptation records. Keep PostgreSQL 16 evidence under its actual version; do not rename the old corpus or assume legacy issue closures prove compatibility with 18.
- Run the corpus and ADBC integration checks on Redis Software with verified active 4x QPF. Record skips, exclusions, infrastructure errors and mismatches separately. Keep credentials and operational artifacts private.
- Resolve mismatches or document the supported subset and each exclusion. Publish reproducible evidence tied to the driver revision and configuration.
Acceptable claims must describe the evidence actually collected, for example “passes the documented PostgreSQL 18 SQL comparison corpus through ADBC under configuration X.” Passing a curated corpus, or even the upstream regression suite, does not establish universal PostgreSQL compatibility or 177/177 SQL:2023 Core conformance. A separate live curated comparison measured 452/651 scored cases passing (69.4%), with 199 mismatches and no infrastructure errors; that result does not validate the entire surface above.
The #359 fix-and-classify change
subsequently measured 574/651 scored passes (88.2%), 77 failures, and no
infrastructure errors at implementation revision b35a4739. All 188 retained
baseline cases have dispositions: 122 observed passes and 66 deferred failures.
The 66 are exclusions from that implementation change, not from #118's
compatibility goal or from the full runner. merged PR #366
delivered the fixes; #118 and the owning feature issues retain the remaining work.