pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #7486: Error Group by
2+ messages / 2 participants
[nested] [flat]
* BUG #7486: Error Group by
@ 2012-08-10 17:33 andersonabreu@gmail.com
0 siblings, 1 reply; 2+ messages in thread
From: andersonabreu@gmail.com @ 2012-08-10 17:33 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 7486
Logged by: Anderson Abreu
Email address: andersonabreu@gmail.com
PostgreSQL version: 8.4.12
Operating system: Linux
Description:
Dear,
I'm test the script, for example: select attA, attB from table1 group by
attA.
In postgre 8.4.X show error column attB must appear in the GROUP BY clause
or be used in an aggregate function.
But, in postgre 9.1.X the query running sucesfully.
Why?
Thank's
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #7486: Error Group by
@ 2012-08-11 09:13 Daniel Farina <daniel@heroku.com>
parent: andersonabreu@gmail.com
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Farina @ 2012-08-11 09:13 UTC (permalink / raw)
To: andersonabreu@gmail.com; +Cc: pgsql-bugs
On Fri, Aug 10, 2012 at 10:33 AM, <andersonabreu@gmail.com> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 7486
> Logged by: Anderson Abreu
> Email address: andersonabreu@gmail.com
> PostgreSQL version: 8.4.12
> Operating system: Linux
> Description:
>
> Dear,
>
> I'm test the script, for example: select attA, attB from table1 group by
> attA.
>
> In postgre 8.4.X show error column attB must appear in the GROUP BY clause
> or be used in an aggregate function.
>
> But, in postgre 9.1.X the query running sucesfully.
>
> Why?
attA is probably a primary key, is that the case?
http://www.postgresql.org/docs/9.1/static/release-9-1.html#AEN107670
"Allow non-GROUP BY columns in the query target list when the primary
key is specified in the GROUP BY clause (Peter Eisentraut)
The SQL standard allows this behavior, and because of the primary key,
the result is unambiguous."
--
fdr
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2012-08-11 09:13 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-08-10 17:33 BUG #7486: Error Group by andersonabreu@gmail.com
2012-08-11 09:13 ` Daniel Farina <daniel@heroku.com>
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