⌘+k ctrl+k
0.10
Search Shortcut cmd + k | ctrl + k
PostgreSQL Compatibility

DuckDB's SQL dialect closely follows the conventions of the PostgreSQL dialect. The few exceptions to this are listed on this page.

UNION of Boolean and Integer Values

The following query fails in PostgreSQL but successfully completes in DuckDB:

SELECT true AS x UNION SELECT 2; 

PostgreSQL returns an error:

ERROR: UNION types boolean and integer cannot be matched 

DuckDB performs an enforced cast, therefore, it completes the query and returns the following:

x
1
2
© 2025 DuckDB Foundation, Amsterdam NL
Code of Conduct Trademark Use