Re: NATURAL JOINs - Mailing list pgsql-general

From Richard Broersma
Subject Re: NATURAL JOINs
Date
Msg-id 396486430810150711y301da49fq16d7b3b4c4fa288d@mail.gmail.com
Whole thread Raw
In response to Re: NATURAL JOINs  ("regme please" <regmeplease@gmail.com>)
Responses Re: NATURAL JOINs
List pgsql-general
On Tue, Oct 14, 2008 at 11:17 PM, regme please <regmeplease@gmail.com> wrote:

> Well, it could make some sense to extend the semantics when you have
> explicit "REFERENCES" to tables in the JOINs.
> Or at least warn or notice the user that the "NATURAL (INNER) JOIN" has
> actuallt been converted into a CROSS one.
> It would not be standard but helpful for developers.

For this reason, clients passing natural joins to the server can have
dangerous result sets returned with no warning.  If one of the joined
columns were to have its name altered, then clients issuing these
queries wouldn't imediately know that there was a problem.  On the
otherhand, a client application joins using the ON clause will get an
error when PostgreSQL notices the nonexistant column reference.

--
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

pgsql-general by date:

Previous
From: "Andrus"
Date:
Subject: Opptimizing projections containing unused columns
Next
From: Alvaro Herrera
Date:
Subject: Re: PL/pgSQL stored procedure returning multiple result sets (SELECTs)?