Re: [GENERAL] NATURAL JOINs

2008-10-16 Thread Marco Colombo
Scott Marlowe wrote: > On Wed, Oct 15, 2008 at 10:17 AM, Richard Broersma > <[EMAIL PROTECTED]> wrote: >> On Wed, Oct 15, 2008 at 9:03 AM, Reg Me Please <[EMAIL PROTECTED]> wrote: >> >>> Both are perfectly right, indeed. >>> Nonetheless, in my opinion a NATURAL JOIN exploiting the FKs >>> instead

Re: [GENERAL] NATURAL JOINs

2008-10-15 Thread Scott Marlowe
On Wed, Oct 15, 2008 at 10:17 AM, Richard Broersma <[EMAIL PROTECTED]> wrote: > On Wed, Oct 15, 2008 at 9:03 AM, Reg Me Please <[EMAIL PROTECTED]> wrote: > >> Both are perfectly right, indeed. >> Nonetheless, in my opinion a NATURAL JOIN exploiting the FKs >> instead of the column names would be m

Re: [GENERAL] NATURAL JOINs

2008-10-15 Thread Richard Broersma
On Wed, Oct 15, 2008 at 9:03 AM, Reg Me Please <[EMAIL PROTECTED]> wrote: > Both are perfectly right, indeed. > Nonetheless, in my opinion a NATURAL JOIN exploiting the FKs > instead of the column names would be much more helpful and much less error > prone! > > As far as I know there is no way t

Re: [GENERAL] NATURAL JOINs

2008-10-15 Thread Reg Me Please
Il Wednesday 15 October 2008 17:55:03 Tom Lane ha scritto: > "Richard Broersma" <[EMAIL PROTECTED]> writes: > > For this reason, clients passing natural joins to the server can have > > dangerous result sets returned with no warning. > > Yeah. A lot of people consider that NATURAL JOIN is simply a

Re: [GENERAL] NATURAL JOINs

2008-10-15 Thread Tom Lane
"Richard Broersma" <[EMAIL PROTECTED]> writes: > For this reason, clients passing natural joins to the server can have > dangerous result sets returned with no warning. Yeah. A lot of people consider that NATURAL JOIN is simply a bad idea and shouldn't be used ever --- it's too easy to shoot your

Re: [GENERAL] NATURAL JOINs

2008-10-15 Thread Richard Broersma
On Tue, Oct 14, 2008 at 11:17 PM, regme please <[EMAIL PROTECTED]> 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

Re: [GENERAL] NATURAL JOINs

2008-10-14 Thread regme please
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. Thanks. 2008/10/

Re: [GENERAL] NATURAL JOINs

2008-10-13 Thread Tom Lane
"Richard Broersma" <[EMAIL PROTECTED]> writes: > On Mon, Oct 13, 2008 at 9:52 AM, Reg Me Please <[EMAIL PROTECTED]> wrote: >> Is there a way to know how a NATURAL JOIN is actually done? > Here is what the manual says about natural joins: > http://www.postgresql.org/docs/8.3/interactive/queries-tab

Re: [GENERAL] NATURAL JOINs

2008-10-13 Thread Richard Broersma
On Mon, Oct 13, 2008 at 9:52 AM, Reg Me Please <[EMAIL PROTECTED]> wrote: > Is there a way to know how a NATURAL JOIN is actually done? Here is what the manual says about natural joins: http://www.postgresql.org/docs/8.3/interactive/queries-table-expressions.html#QUERIES-FROM ... Finally, NATURA

[GENERAL] NATURAL JOINs

2008-10-13 Thread Reg Me Please
Hi all. I'm running v8.3.3 First point. Is there a way to know how a NATURAL JOIN is actually done? That is, which fields are actually used for the join? The EXPLAIN directive doesn't show anyting useful. Second point. I have this: CREATE TABLE tab_dictionary ( item text primary key ); CREATE