diff options
author | Bruce Momjian <bruce@momjian.us> | 2014-03-07 20:56:00 -0500 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2014-03-07 20:56:16 -0500 |
commit | b0cb40f93a85fd15e930828d9336e9f999ca3224 (patch) | |
tree | 62a5b37f297422976e33d19a387fbef4b96b33ab /doc/src | |
parent | ea177a3ba7a7901f6467eadb0a407e03d46462fd (diff) | |
download | postgresql-b0cb40f93a85fd15e930828d9336e9f999ca3224.tar.gz postgresql-b0cb40f93a85fd15e930828d9336e9f999ca3224.zip |
docs: improve TABLE command by showing supported clauses
Initial patch by Colin 't Hart
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/select.sgml | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml index 73957546627..f1bc158d03b 100644 --- a/doc/src/sgml/ref/select.sgml +++ b/doc/src/sgml/ref/select.sgml @@ -214,7 +214,7 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] subqueries that can be referenced by name in the primary query. The subqueries effectively act as temporary tables or views for the duration of the primary query. - Each subquery can be a <command>SELECT</command>, <command>VALUES</command>, + Each subquery can be a <command>SELECT</command>, <command>TABLE</>, <command>VALUES</command>, <command>INSERT</command>, <command>UPDATE</command> or <command>DELETE</command> statement. When writing a data-modifying statement (<command>INSERT</command>, @@ -1489,12 +1489,17 @@ SELECT * FROM (SELECT * FROM mytable FOR UPDATE) ss ORDER BY column1; <programlisting> TABLE <replaceable class="parameter">name</replaceable> </programlisting> - is completely equivalent to + is equivalent to <programlisting> SELECT * FROM <replaceable class="parameter">name</replaceable> </programlisting> It can be used as a top-level command or as a space-saving syntax - variant in parts of complex queries. + variant in parts of complex queries. Only the <literal>WITH</>, + <literal>UNION</>, <literal>INTERSECT</>, <literal>EXCEPT</>, + <literal>ORDER BY</>, <literal>LIMIT</>, <literal>OFFSET</>, + <literal>FETCH</> and locking clauses can be used with <command>TABLE</>; + the <literal>WHERE</> clause and any form of aggregation cannot + be used. </para> </refsect2> </refsect1> |