From: Bruno Wolff III <bruno@wolff.to>
To: Nicholas Allen <nallen@freenet.co.uk>
Cc: Dmitry Tkach <dmitry@openratings.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Possible bug in Postgres? Followup to "How do you select from a table until a condition is met?"
Date: Wed, 12 Feb 2003 20:19:07 -0600
Message-ID: <20030213021907.GA2561@wolff.to> (raw)
In-Reply-To: <200302122321.18463.nallen@freenet.co.uk>
References: <200302121910.38232.nallen@freenet.co.uk>
<200302122153.08970.nallen@freenet.co.uk>
<3E4ACE74.109@openratings.com>
<200302122321.18463.nallen@freenet.co.uk>
On Wed, Feb 12, 2003 at 23:21:18 +0100,
Nicholas Allen <nallen@freenet.co.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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: bruno@wolff.to, nallen@freenet.co.uk, dmitry@openratings.com
Subject: Re: Possible bug in Postgres? Followup to "How do you select from a table until a condition is met?"
In-Reply-To: <20030213021907.GA2561@wolff.to>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox