On Wed, Nov 13, 2013 at 10:28:07AM +0100, Colin 't Hart wrote: > David et al, > > How about something like this?
I have applied a modified version of your patch. I didn't like the idea of putting "SELECT" inside an OR syntax clauses --- the syntax is already too complicated. I also didn't like moving the TABLE mention up in the file. What I did do was to document the supported TABLE clauses, and add some of your verbiage. Thanks. -- Bruce Momjian <br...@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. +
diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml new file mode 100644 index 7395754..f1bc158 *** a/doc/src/sgml/ref/select.sgml --- b/doc/src/sgml/ref/select.sgml *************** TABLE [ ONLY ] <replaceable class="param *** 214,220 **** 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>, <command>INSERT</command>, <command>UPDATE</command> or <command>DELETE</command> statement. When writing a data-modifying statement (<command>INSERT</command>, --- 214,220 ---- 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>TABLE</>, <command>VALUES</command>, <command>INSERT</command>, <command>UPDATE</command> or <command>DELETE</command> statement. When writing a data-modifying statement (<command>INSERT</command>, *************** SELECT * FROM (SELECT * FROM mytable FOR *** 1489,1500 **** <programlisting> TABLE <replaceable class="parameter">name</replaceable> </programlisting> ! is completely 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. </para> </refsect2> </refsect1> --- 1489,1505 ---- <programlisting> TABLE <replaceable class="parameter">name</replaceable> </programlisting> ! 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. 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>
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers