Re: count syntax - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: count syntax
Date
Msg-id 20030411143353.GB26041@wolff.to
Whole thread Raw
In response to count syntax  (Patrick Welche <prlw1@newn.cam.ac.uk>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: count syntax
Next
From: Jan Wieck
Date:
Subject: Re: help Request