diff --git a/docs/sql/dialect/postgresql_compatibility.md b/docs/sql/dialect/postgresql_compatibility.md index 586a7a46d0..6b5c3895fb 100644 --- a/docs/sql/dialect/postgresql_compatibility.md +++ b/docs/sql/dialect/postgresql_compatibility.md @@ -44,15 +44,16 @@ SELECT 1 / 2 AS x; PostgreSQL returns: -```text - x ---- - 0 -(1 row) -``` +
+ +| x | +| ---: | +| 0 | DuckDB returns: +
+ | x | | ---: | | 0.5 | @@ -63,6 +64,8 @@ To perform integer division in DuckDB, use the `//` operator: SELECT 1 // 2 AS x; ``` +
+ | x | | ---: | | 0 | @@ -85,6 +88,9 @@ 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 | @@ -162,14 +168,11 @@ SELECT 1 == 1 AS t; DuckDB returns: -```text -┌─────────┐ -│ t │ -│ boolean │ -├─────────┤ -│ true │ -└─────────┘ -``` +
+ +| t | +| ---: | +| true | Postgres returns: @@ -219,7 +222,6 @@ PostgreSQL returns an error on the last statement: ```console ERROR: type "mytype" does not exist LINE 1: CREATE TABLE myschema.mytable (v mytype); - ^ ``` DuckDB runs the statement and creates the table successfully, confirmed by the following query: @@ -228,11 +230,9 @@ DuckDB runs the statement and creates the table successfully, confirmed by the f DESCRIBE myschema.mytable; ``` -```text -┌─────────────┬──────────────────┬─────────┬─────────┬─────────┬─────────┐ -│ column_name │ column_type │ null │ key │ default │ extra │ -│ varchar │ varchar │ varchar │ varchar │ varchar │ varchar │ -├─────────────┼──────────────────┼─────────┼─────────┼─────────┼─────────┤ -│ v │ ENUM('as', 'df') │ YES │ NULL │ NULL │ NULL │ -└─────────────┴──────────────────┴─────────┴─────────┴─────────┴─────────┘ -``` +
+ +| column_name | column_type | null | key | default | extra | +|-------------|------------------|------|------|---------|-------| +| v | ENUM('as', 'df') | YES | NULL | NULL | NULL | +