Re: count syntax

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: count syntax
Дата
Msg-id 20030411143353.GB26041@wolff.to
обсуждение исходный текст
Ответ на count syntax  (Patrick Welche <prlw1@newn.cam.ac.uk>)
Список pgsql-general
On Fri, Apr 11, 2003 at 12:44:38 +0100,
  Patrick Welche <prlw1@newn.cam.ac.uk> wrote:
> What is the difference between the following?
>
> transatlantic=# select count(*) from trans;
>  count
> --------
>  453602
> (1 row)

The above counts all rows.

>
> transatlantic=# select count(trans.flowindex) from trans;
>  count
> --------
>  453602
> (1 row)

The above counts all rows where trans.flowindex is not null.

>
> transatlantic=# select count(trans.*) from trans;
> ERROR:  Memory exhausted in AllocSetAlloc(204)

I don't know why you got an error here.

>
> % limit
> cputime         unlimited
> filesize        unlimited
> datasize        1048576 kbytes
> stacksize       32768 kbytes
> coredumpsize    unlimited
> memoryuse       2048532 kbytes
> memorylocked    2048532 kbytes
> maxproc         1044
> openfiles       3404
>
>
> Cheers,
>
> Patrick
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: count syntax
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: help Request