Re: NATURAL JOINs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Richard Broersma" <richard(dot)broersma(at)gmail(dot)com>
Cc: "regme please" <regmeplease(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: NATURAL JOINs
Date: 2008-10-15 15:55:03
Message-ID: 22338.1224086103@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Richard Broersma" <richard(dot)broersma(at)gmail(dot)com> 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 yourself in the
foot with a careless column addition or rename. Explicitly spelling out
the join columns with ON or USING is a lot less prone to silent breakage
after a schema change.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Grzegorz Jaśkiewicz 2008-10-15 15:55:46 Re: Opptimizing projections containing unused columns
Previous Message Tom Lane 2008-10-15 15:51:53 Re: Backup strategies