From: Josh Berkus <josh@agliodbs.com>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: Dan Langille <dan@langille.org>
Cc: Chad Thompson <chad@weblinkservices.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: 7.3 "group by" issue
Date: Sun, 23 Feb 2003 11:59:35 -0800
Message-ID: <200302231159.35826.josh@agliodbs.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0302230245070.2308-100000@peter.localdomain>
References: <Pine.LNX.4.44.0302230245070.2308-100000@peter.localdomain>
Peter,
> Consider JOIN to be a black-box function, then you'd be writing something
> like
>
> SELECT a.c1, count(a.c2)
> FROM func(a, b) AS r (c1, c2, c3, c4, c5)
> WHERE b.c5 = x
> GROUP BY c1; -- <== refers to r.c1
>
> Clearly in this case you cannot claim that in general a.c1 == r.c1.
>
> If the func() is an inner join, then the claim is true, but if it's an
> outer join it's not. The scoping rules for inner and outer joins are the
> same, and that might be considered a good thing.
I see what you mean ... though I still hold that it's an implementation issue,
rather than a theory one. That is, a human can easily tell the differences
when differently qualified table names are exactly equivalent even if a
parser cannot.
But I can definitely see where trying to accomodate this would be doing a
*lot* of programming to support sloppy syntax in a rather limited number of
useful cases.
More on BUGS
--
Josh Berkus
Aglio Database Solutions
San Francisco
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: josh@agliodbs.com, peter_e@gmx.net, dan@langille.org, chad@weblinkservices.com
Subject: Re: 7.3 "group by" issue
In-Reply-To: <200302231159.35826.josh@agliodbs.com>
* 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