Thread: minor SELECT doc patch
The documentation for SELECT is incorrect in a sense: the syntax for a join is defined as: from_item [ NATURAL ] join_type from_item [ ON join_condition | USING ( join_column_list ) ] However, if the join_type is an INNER or OUTER join, an ON, USING, or NATURAL clause *must* be specified (it's not optional, as that segment of the docs suggest). I'm not exactly sure what the best way to fix this is, so I've attached a patch adding a FIXME comment to the relevant section of the SGML. If anyone has any ideas on the proper way to outline join syntax, please speak up. Cheers, Neil -- Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC
Attachment
Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches I will try to apply it within the next 48 hours. --------------------------------------------------------------------------- Neil Conway wrote: > The documentation for SELECT is incorrect in a sense: the syntax for a > join is defined as: > > from_item [ NATURAL ] join_type from_item > [ ON join_condition | USING ( join_column_list ) ] > > However, if the join_type is an INNER or OUTER join, an ON, USING, or > NATURAL clause *must* be specified (it's not optional, as that segment > of the docs suggest). > > I'm not exactly sure what the best way to fix this is, so I've attached > a patch adding a FIXME comment to the relevant section of the SGML. If > anyone has any ideas on the proper way to outline join syntax, please > speak up. > > Cheers, > > Neil > -- > Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC > > [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faqs/FAQ.html -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
Patch applied. Thanks. --------------------------------------------------------------------------- Neil Conway wrote: > The documentation for SELECT is incorrect in a sense: the syntax for a > join is defined as: > > from_item [ NATURAL ] join_type from_item > [ ON join_condition | USING ( join_column_list ) ] > > However, if the join_type is an INNER or OUTER join, an ON, USING, or > NATURAL clause *must* be specified (it's not optional, as that segment > of the docs suggest). > > I'm not exactly sure what the best way to fix this is, so I've attached > a patch adding a FIXME comment to the relevant section of the SGML. If > anyone has any ideas on the proper way to outline join syntax, please > speak up. > > Cheers, > > Neil > -- > Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC > > [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faqs/FAQ.html -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073