Re: Proper relational database?
| От | Manuel Gómez |
|---|---|
| Тема | Re: Proper relational database? |
| Дата | |
| Msg-id | CAJWnFaMkDskHNfHtXn=LOa5OBrQ983ZwmQQGOHMWQnMNfiUCDA@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Proper relational database? (Geoff Winkless <pgsqladmin@geoff.dj>) |
| Список | pgsql-general |
On Sat, Apr 23, 2016 at 10:39 AM, Geoff Winkless <pgsqladmin@geoff.dj> 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.
В списке pgsql-general по дате отправления: