Re: GROUP BY + join regression in 7.3 - Mailing list pgsql-hackers

From Joe Conway
Subject Re: GROUP BY + join regression in 7.3
Date
Msg-id 3E88F3A7.2030904@joeconway.com
Whole thread Raw
In response to GROUP BY + join regression in 7.3  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: GROUP BY + join regression in 7.3  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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);
> CREATE TABLE
> regression=# create table t2(f2 int, f3 int);
> CREATE TABLE
> 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

[...snip...]

> 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.

Joe



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: optimizer cost calculation problem
Next
From: "Ron Mayer"
Date:
Subject: Re: optimizer cost calculation problem