Re: count syntax

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: count syntax
Date: 2003-04-11 14:33:53
Message-ID: 20030411143353.GB26041@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Apr 11, 2003 at 12:44:38 +0100,
Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)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(at)postgresql(dot)org)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2003-04-11 14:54:10 Re: help Request
Previous Message Tom Lane 2003-04-11 14:29:43 Re: count syntax