Re: Shouldn't Natural JOINs Follow FK Constraints?

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Shouldn't Natural JOINs Follow FK Constraints?
Date: 2008-05-30 21:52:39
Message-ID: 1212184359.15167.1.camel@dogma.ljc.laika.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 2008-05-30 at 13:19 -0700, David E. Wheeler wrote:
> Howdy,
>
> I just saw this in the docs:
>
> > Finally, NATURAL is a shorthand form of USING: it forms a USING list
> > consisting of exactly those column names that appear in both input
> > tables. As with USING, these columns appear only once in the output
> > table.
>
> That sounds useful if I happen to have named my columns exactly the
> same between the two tables, but couldn't a NATURAL JOIN follow the FK
> constraints, instead? That would be so much more useful and much less
> magical, I should think.

A good point, but I'm sure the SQL standard has something to say about
this, so I don't think we have much of a choice.

Regards,
Jeff Davis

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2008-05-30 22:11:20 Re: Core team statement on replication in PostgreSQL
Previous Message Gurjeet Singh 2008-05-30 21:18:51 Re: Core team statement on replication in PostgreSQL