public inbox for [email protected]  
help / color / mirror / Atom feed
7.2. Table Expressions suggestion about NATURAL JOIN
4+ messages / 2 participants
[nested] [flat]

* 7.2. Table Expressions suggestion about NATURAL JOIN
@ 2011-05-18 01:47 Grzegorz Szpetkowski <[email protected]>
  2011-05-18 01:52 ` Re: 7.2. Table Expressions suggestion about NATURAL JOIN Grzegorz Szpetkowski <[email protected]>
  2011-06-13 17:00 ` Re: 7.2. Table Expressions suggestion about NATURAL JOIN Robert Haas <[email protected]>
  0 siblings, 2 replies; 4+ messages in thread

From: Grzegorz Szpetkowski @ 2011-05-18 01:47 UTC (permalink / raw)
  To: pgsql-docs

http://www.postgresql.org/docs/9.0/static/queries-table-expressions.html
http://www.postgresql.org/docs/9.0/static/sql-select.html

Respectively:

"Finally, NATURAL is a shorthand form of USING: it forms a USING list
consisting of all column names that appear in both input tables. As
with USING, these columns appear only once in the output table."

and

"NATURAL is shorthand for a USING list that mentions all columns in
the two tables that have the same names."

To make that comprehensive you can add something like: "Note that if
there is no any "shared" column between tables, then NATURAL JOIN acts
like ON TRUE (that is, tables are cross-joined)", because it's not
obvious.

thanks & regards,
greg szpetkowski



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: 7.2. Table Expressions suggestion about NATURAL JOIN
  2011-05-18 01:47 7.2. Table Expressions suggestion about NATURAL JOIN Grzegorz Szpetkowski <[email protected]>
@ 2011-05-18 01:52 ` Grzegorz Szpetkowski <[email protected]>
  1 sibling, 0 replies; 4+ messages in thread

From: Grzegorz Szpetkowski @ 2011-05-18 01:52 UTC (permalink / raw)
  To: pgsql-docs

2011/5/18 Grzegorz Szpetkowski <[email protected]>:
> http://www.postgresql.org/docs/9.0/static/queries-table-expressions.html
> http://www.postgresql.org/docs/9.0/static/sql-select.html
>
> Respectively:
>
> "Finally, NATURAL is a shorthand form of USING: it forms a USING list
> consisting of all column names that appear in both input tables. As
> with USING, these columns appear only once in the output table."
>
> and
>
> "NATURAL is shorthand for a USING list that mentions all columns in
> the two tables that have the same names."
>
> To make that comprehensive you can add something like: "Note that if
> there is no any "shared" column between tables, then NATURAL JOIN acts
> like ON TRUE (that is, tables are cross-joined)", because it's not
> obvious.
>
> thanks & regards,
> greg szpetkowski
>

My mistake "NATURAL JOIN", better is to just write "NATURAL".

thanks & regards,
greg szpetkowski



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: 7.2. Table Expressions suggestion about NATURAL JOIN
  2011-05-18 01:47 7.2. Table Expressions suggestion about NATURAL JOIN Grzegorz Szpetkowski <[email protected]>
@ 2011-06-13 17:00 ` Robert Haas <[email protected]>
  1 sibling, 0 replies; 4+ messages in thread

From: Robert Haas @ 2011-06-13 17:00 UTC (permalink / raw)
  To: Grzegorz Szpetkowski <[email protected]>; +Cc: pgsql-docs

On Tue, May 17, 2011 at 9:47 PM, Grzegorz Szpetkowski
<[email protected]> wrote:
> http://www.postgresql.org/docs/9.0/static/queries-table-expressions.html
> http://www.postgresql.org/docs/9.0/static/sql-select.html
>
> Respectively:
>
> "Finally, NATURAL is a shorthand form of USING: it forms a USING list
> consisting of all column names that appear in both input tables. As
> with USING, these columns appear only once in the output table."
>
> and
>
> "NATURAL is shorthand for a USING list that mentions all columns in
> the two tables that have the same names."
>
> To make that comprehensive you can add something like: "Note that if
> there is no any "shared" column between tables, then NATURAL JOIN acts
> like ON TRUE (that is, tables are cross-joined)", because it's not
> obvious.

Done, with different wording.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* 7.2. Table Expressions suggestion about NATURAL JOIN
@ 2011-05-18 01:47 Grzegorz Szpetkowski <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: Grzegorz Szpetkowski @ 2011-05-18 01:47 UTC (permalink / raw)
  To: pgsql-docs

http://www.postgresql.org/docs/9.0/static/queries-table-expressions.html
http://www.postgresql.org/docs/9.0/static/sql-select.html

Respectively:

"Finally, NATURAL is a shorthand form of USING: it forms a USING list
consisting of all column names that appear in both input tables. As
with USING, these columns appear only once in the output table."

and

"NATURAL is shorthand for a USING list that mentions all columns in
the two tables that have the same names."

To make that comprehensive you can add something like: "Note that if
there is no any "shared" column between tables, then NATURAL JOIN acts
like ON TRUE (that is, tables are cross-joined)", because it's not
obvious.

thanks & regards,
greg szpetkowski

-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs





^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2011-06-13 17:00 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-05-18 01:47 7.2. Table Expressions suggestion about NATURAL JOIN Grzegorz Szpetkowski <[email protected]>
2011-05-18 01:52 ` Grzegorz Szpetkowski <[email protected]>
2011-06-13 17:00 ` Robert Haas <[email protected]>
2011-05-18 01:47 7.2. Table Expressions suggestion about NATURAL JOIN Grzegorz Szpetkowski <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox