pgsql-bugs(at)postgresql(dot)org
Hello, friends!
This statement returns nothing:
WITH x AS (VALUES (1))
SELECT * FROM x
ORDER BY unnest(NULL :: INT [])
;
--0 rows retrieved
--PostgreSQL 9.6.1, compiled by Visual C++ build 1800, 64-bit
--PostgreSQL 10.3, compiled by Visual C++ build 1800, 64-bit
I think any "ORDER BY" construct can't filter result set.