Skip to Content
We are live but in Staging 🎉
Data EnginesSQLPostgres compatibilityOverview

Postgres compatibility

The engine parses DuckDB SQL and adds the Postgres forms drivers and ORMs actually send: $1 parameters, public. qualifiers, SERIAL, FOR UPDATE, GROUP BY on a key, col = ANY($1), ON CONFLICT, ON DUPLICATE KEY UPDATE, and the connect-time catalog probes of psycopg, SQLAlchemy, Django, Prisma and GORM. Where DuckDB and Postgres disagree on a result, the engine follows Postgres for the cases that matter to application code: decimal arithmetic is exact and rounds like Postgres, INTEGER is 64-bit, VARCHAR(n) is enforced.

The status vocabulary

Every row on the sub-pages uses one of these:

BadgeMeaning
Enforced23505The engine guarantees it. The code is the SQLSTATE a violation raises.
SupportedThe statement or function works as in Postgres.
PartialWorks, with a documented difference described in the row.
Accepted · NOTICEAccepted so migrations and drivers run, but not acted on. A NOTICE tells you each time.
Accepted · no effectAccepted for driver compatibility with no effect and no notice.
Refused0A000Rejected with the SQLSTATE shown (omitted where it varies). The message names what to use instead.
PlannedNot available; on the roadmap.

A behaviour younger than 0.1.40 carries its release, for example since 0.1.43. Your deployment’s version is in SHOW server_version under the dodil suffix, or from dodil data health.

Pages

PageQuestion it answers
Data typesWhich Postgres types can I declare, what is exact, what does my driver see on the wire?
StatementsWhich DDL, DML, transaction and session statements work, and which are refused?
ConstraintsWhich constraints are enforced, which are accepted with a notice, which are refused?
Functions & operatorsWhich functions exist, how does arithmetic round, how do JSON and vector operators work?
CatalogWhat does information_schema and pg_catalog report; what does DESCRIBE show?

Concurrency, isolation and FOR UPDATE are on Transactions & concurrency. The single list of everything that differs from Postgres is Limits & differences.