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: 3E88F3A7.2030904@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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);
> 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ron Mayer 2003-04-01 02:06:47 Re: optimizer cost calculation problem
Previous Message Tom Lane 2003-04-01 01:22:55 Re: optimizer cost calculation problem