diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml index 7395754662..f1bc158d03 100644 --- a/doc/src/sgml/ref/select.sgml +++ b/doc/src/sgml/ref/select.sgml @@ -214,7 +214,7 @@ TABLE [ ONLY ] table_name [ * ] 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 SELECT, VALUES, + Each subquery can be a SELECT, TABLE, VALUES, INSERT, UPDATE or DELETE statement. When writing a data-modifying statement (INSERT, @@ -1489,12 +1489,17 @@ SELECT * FROM (SELECT * FROM mytable FOR UPDATE) ss ORDER BY column1; TABLE name - is completely equivalent to + is equivalent to SELECT * FROM name 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 WITH, + UNION, INTERSECT, EXCEPT, + ORDER BY, LIMIT, OFFSET, + FETCH and locking clauses can be used with TABLE; + the WHERE clause and any form of aggregation cannot + be used.