| От | Peter Eisentraut |
|---|---|
| Тема | Re: Postgres 7.3.5 and count('x') |
| Дата | |
| Msg-id | 200312061746.37190.peter_e@gmx.net обсуждение исходный текст |
| Ответ на | Re: Postgres 7.3.5 and count('x') (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Postgres 7.3.5 and count('x')
Re: Postgres 7.3.5 and count('x') |
| Список | pgsql-hackers |
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > What is COUNT('x') supposed to return? 1? Is that legal SQL?
>
> Why not?
Because there is nothing to count.
In general,
SELECT count(expr) FROM table1;
counts the number of rows in table1 where expr evaluates to not null.
If table1 is not specified, that rule no longer holds. At best you
could assume that table1 is empty and return 0. But a result of 1 I
cannot see justified.
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера