Skip site navigation (1) Skip section navigation (2)

Re: GROUP BY + join regression in 7.3

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: GROUP BY + join regression in 7.3
Date: 2003-04-01 02:04:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Tom Lane wrote:
> I have just noticed that 7.3 and CVS tip reject a query that was
> accepted in earlier releases:
> regression=# create table t1(f1 int, f2 int);
> regression=# create table t2(f2 int, f3 int);
> regression=# select t1.f1 from t1 join t2 on (t1.f2=t2.f2) group by f1;
> ERROR:  Attribute t1.f1 must be GROUPed or used in an aggregate function


> In the plain inner-join case, there isn't any semantic difference
> between "f1" and "t1.f1", but does that mean we should treat them
> as the same grouping column?  I'm not sure.  Anyone want to try these
> cases on other DBMSes?

I did the above on MSSQL2000 -- it works with no error. I haven't been 
able to get at a development Oracle db, but I'll try to tomorrow.


In response to


pgsql-hackers by date

Next:From: Ron MayerDate: 2003-04-01 02:06:47
Subject: Re: optimizer cost calculation problem
Previous:From: Tom LaneDate: 2003-04-01 01:22:55
Subject: Re: optimizer cost calculation problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group