On Sat, Apr 23, 2016 at 10:39 AM, Geoff Winkless <pgsqladmin@xxxxxxxx> wrote: > SELECT with no values is selecting a NULL, and two NULLs do not > equate, so you would expect two rows. This is precisely what I mean by wonky semantics: it makes no sense for a nullary relation to be interpreted as selecting a NULL. A row with no columns should have different semantics from a row with one NULL column. Indeed it does in other contexts; note its correct behavior as the neutral for the cross join operator: postgres=# select * from (values (42)) as t(n) cross join (select) as dee; n ---- 42 (1 row) postgres=# select * from (values (42)) as t(n) cross join (select NULL) as not_dee; n | ?column? ----+---------- 42 | (1 row) The empty tuple should equal itself and its semantics should have nothing at all to do with NULL, and thence I expect one row. I've even been tempted to file a bug report, but I fear it may be brushed off as pedantry. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general