Re: Proper relational database?

Поиск
Список
Период
Сортировка
От Geoff Winkless
Тема Re: Proper relational database?
Дата
Msg-id CAEzk6fdj77LqhSJtgmbqbx3oyCkq3cDHYwX-9kCHqhrPpm1ZRg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Proper relational database?  (Manuel Gómez <targen@gmail.com>)
Ответы Re: Proper relational database?  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: Proper relational database?  (Manuel Gómez <targen@gmail.com>)
Список pgsql-general
On 23 April 2016 at 07:08, Manuel Gómez <targen@gmail.com> wrote:
> but its semantics can be rather wonky.  Witness:
>
> postgres=# select 1;
>  ?column?
> ----------
>         1
> (1 row)
>
> postgres=# select 1 union select 1;
>  ?column?
> ----------
>         1
> (1 row)


Exactly what you would expect. Use UNION ALL to get two rows.

> postgres=# select;
> --
> (1 row)
>
> postgres=# select union select;
> --
> (2 rows)

SELECT with no values is selecting a NULL, and two NULLs do not
equate, so you would expect two rows.

> postgres=# select 1 intersect select 1;
>  ?column?
> ----------
>         1
> (1 row)
>
> postgres=# select intersect select;
> --
> (2 rows)

See above.

Geoff


В списке pgsql-general по дате отправления:

Предыдущее
От:
Дата:
Сообщение: Re: Proper relational database?
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Proper relational database?