Sort Ordering for NULL
s in DuckDB vs Postgres
#12067
-
Hi, Is the following an oversight or the expected behavior for DuckDB? The docs suggests that the sort ordering is identical to Postgres: However, it seems like there is a difference between DuckDB and PostgreSQL for
And, this is in action where the outputs are different for Postgres and Duckdb: Postgres: CREATE TABLE orderby_test (a int);
INSERT INTO orderby_test VALUES (1), (NULL);
SELECT * FROM orderby_test ORDER BY a DESC;
a
---
1
(2 rows)
Duckdb: D CREATE TABLE orderby_test (a int);
D INSERT INTO orderby_test VALUES (1), (NULL);
D SELECT * FROM orderby_test ORDER BY a DESC;
┌───────┐
│ a │
│ int32 │
├───────┤
│ 1 │
│ │
└───────┘
D |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
-
Nice, thanks for the tip! |
Beta Was this translation helpful? Give feedback.
SET default_null_order='postgres'