PostgreSQL Compatibility

AionDB speaks PostgreSQL wire protocol so existing tools can connect, but compatibility is implemented feature by feature. Treat v0.1 as PostgreSQL-facing, not PostgreSQL-complete.

What should work first

The priority surface is:

This priority list is intentionally practical. If a normal driver cannot connect, run a prepared query, report errors, and recover transaction state, broader SQL compatibility does not matter yet.

Quick compatibility smoke test

Run this with the client you care about:

SELECT 1;
CREATE TABLE compat_smoke (id INT PRIMARY KEY, body TEXT);
INSERT INTO compat_smoke VALUES (1, 'ok');
SELECT body FROM compat_smoke WHERE id = 1;
BEGIN;
INSERT INTO compat_smoke VALUES (2, 'rollback');
ROLLBACK;
SELECT COUNT(*) FROM compat_smoke;

Then repeat with a parameterized query through the driver. This catches more real compatibility issues than a manual SELECT 1 alone.

What needs explicit testing

Test your actual client stack before relying on compatibility:

Compatibility levels

Think about compatibility in layers:

LayerWhat to test
Protocolstartup, simple query, parse, bind, execute, sync, error response
SQL syntaxDDL, DML, expressions, joins, transactions
Typestext and binary formats, casts, nulls, arrays, timestamps, vectors
Catalogintrospection queries used by tools and ORMs
Behaviortransaction state, error classes, command tags, row descriptions

AionDB can pass one layer while still failing another. A good report names the layer.

Driver behavior matrix

Track drivers in a table during evaluation:

DriverConnectSimple queryPrepared queryTransactionsNotes
psqltestedtestednot enoughtestedbaseline console
Application drivernot testednot testednot testednot testedfill during evaluation

Do not claim support for a driver until the application query path has been tested, not just connection startup.

Unsupported PostgreSQL features

PostgreSQL has a very large surface area. AionDB v0.1 does not claim full support for PostgreSQL extensions, every system catalog detail, every planner behavior, every procedural language feature, or every wire-protocol corner case.

Unsupported behavior should fail explicitly. Silent mismatch is a bug.

Catalog compatibility is documented in System Catalogs. SQLSTATE behavior is summarized in Error Reference.

Practical guidance

For a new driver or ORM:

  1. Start with a connection smoke test.
  2. Run simple DDL, INSERT, SELECT, UPDATE, DELETE, and transaction tests.
  3. Add prepared statements.
  4. Add the exact SQL generated by the framework.
  5. Reduce every mismatch to a small SQL file and keep it in the compatibility suite.

Reporting mismatches

A useful compatibility report includes:

If PostgreSQL and AionDB disagree, include the PostgreSQL result. That turns a vague compatibility problem into a concrete target.

Compatibility language

Use precise wording:

Avoid broad claims unless there is a compatibility matrix behind them.