Re: NATURAL JOINs

From: "Richard Broersma" <richard(dot)broersma(at)gmail(dot)com>
To: "regme please" <regmeplease(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: NATURAL JOINs
Date: 2008-10-15 14:11:45
Message-ID: 396486430810150711y301da49fq16d7b3b4c4fa288d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Oct 14, 2008 at 11:17 PM, regme please <regmeplease(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Childs 2008-10-15 14:22:39 Re: Backup strategies
Previous Message Ivan Voras 2008-10-15 14:05:06 Re: Backup strategies