Re: Possible bug in Postgres? Followup to "How do you select from a table until a condition is met?"

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Nicholas Allen <nallen(at)freenet(dot)co(dot)uk>
Cc: Dmitry Tkach <dmitry(at)openratings(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Possible bug in Postgres? Followup to "How do you select from a table until a condition is met?"
Date: 2003-02-13 02:19:07
Message-ID: 20030213021907.GA2561@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, Feb 12, 2003 at 23:21:18 +0100,
Nicholas Allen <nallen(at)freenet(dot)co(dot)uk> wrote:
> However, if I try to count the records using the count(*) function I get the following error.
>
> ERROR: Attribute vu_tbl_user_all_s.s_surname must be GROUPed or used in an aggregate function
>
> Surely, if postgres can execute the query it should also be able to count the rows that would be returned in the query? Is this a bug in Postgres and is there a work around? I am using Postgres 7.3.

If you are using count you probably don't want to be returning surnames, just
the count.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Joe Conway 2003-02-13 04:19:03 Re: dblink question please
Previous Message Frankie Lam 2003-02-13 01:52:24 dblink question please