Re: Select count(*) /*from*/ table

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Select count(*) /*from*/ table
Дата
Msg-id 19739.1309883157@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Select count(*) /*from*/ table  (Alexander Shulgin <alex.shulgin@gmail.com>)
Список pgsql-general
Alexander Shulgin <alex.shulgin@gmail.com> writes:
> I understand that there's really not much point in running COUNT w/o
> the FROM list, but maybe we should just disallow COUNT(*) with empty
> FROM list?

While I don't offhand see a use case for aggregates without FROM,
it's a long way from there to asserting that there is no use case.

The real foot-gun here IMO is the ability to omit "AS", which
unfortunately we're kind of stuck with because it's in the SQL standard.

            regards, tom lane

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

Предыдущее
От: Geoffrey Myers
Дата:
Сообщение: Re: out of memory error
Следующее
От: Alban Hertroys
Дата:
Сообщение: Re: Read MS-SQL data into Postgres via ODBC link?