diff options
author | Bruce Momjian <bruce@momjian.us> | 2003-03-20 19:00:01 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2003-03-20 19:00:01 +0000 |
commit | 0fe77d7283160fc9dc5b5cacd1a70502835350e3 (patch) | |
tree | aec113cb20f2572903fcfc150dff3388b96f32d5 | |
parent | e0d043b94d131b1e46d14775f897e7bad05e1bc8 (diff) | |
download | postgresql-0fe77d7283160fc9dc5b5cacd1a70502835350e3.tar.gz postgresql-0fe77d7283160fc9dc5b5cacd1a70502835350e3.zip |
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.
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC
-rw-r--r-- | doc/src/sgml/ref/select.sgml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml index 0f8a3dbcc92..42281e5cf00 100644 --- a/doc/src/sgml/ref/select.sgml +++ b/doc/src/sgml/ref/select.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v 1.64 2003/01/19 00:13:31 momjian Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v 1.65 2003/03/20 19:00:01 momjian Exp $ PostgreSQL documentation --> @@ -46,6 +46,11 @@ where <replaceable class="PARAMETER">from_item</replaceable> can be: <replaceable class="PARAMETER">table_function_name</replaceable> ( [ <replaceable class="parameter">argument</replaceable> [, ...] ] ) AS ( <replaceable class="PARAMETER">column_definition_list</replaceable> ) | +<!-- + FIXME: this syntax is incorrect if the join type is an INNER or + OUTER join (in which case one of NATURAL, ON ..., or USING ... is + mandatory, not optional). What's the best way to fix this? +--> <replaceable class="PARAMETER">from_item</replaceable> [ NATURAL ] <replaceable class="PARAMETER">join_type</replaceable> <replaceable class="PARAMETER">from_item</replaceable> [ ON <replaceable class="PARAMETER">join_condition</replaceable> | USING ( <replaceable class="PARAMETER">join_column_list</replaceable> ) ] </synopsis> |