aboutsummaryrefslogtreecommitdiff
path: root/doc/src/sgml/ref/update.sgml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/sgml/ref/update.sgml')
-rw-r--r--doc/src/sgml/ref/update.sgml14
1 files changed, 6 insertions, 8 deletions
diff --git a/doc/src/sgml/ref/update.sgml b/doc/src/sgml/ref/update.sgml
index c575374dd0d..90b92085cd2 100644
--- a/doc/src/sgml/ref/update.sgml
+++ b/doc/src/sgml/ref/update.sgml
@@ -22,7 +22,7 @@ PostgreSQL documentation
<refsynopsisdiv>
<synopsis>
[ WITH [ RECURSIVE ] <replaceable class="parameter">with_query</replaceable> [, ...] ]
-UPDATE [ ONLY ] <replaceable class="PARAMETER">table_name</replaceable> [ [ AS ] <replaceable class="parameter">alias</replaceable> ]
+UPDATE [ ONLY ] <replaceable class="PARAMETER">table_name</replaceable> [ * ] [ [ AS ] <replaceable class="parameter">alias</replaceable> ]
SET { <replaceable class="PARAMETER">column_name</replaceable> = { <replaceable class="PARAMETER">expression</replaceable> | DEFAULT } |
( <replaceable class="PARAMETER">column_name</replaceable> [, ...] ) = ( { <replaceable class="PARAMETER">expression</replaceable> | DEFAULT } [, ...] ) } [, ...]
[ FROM <replaceable class="PARAMETER">from_list</replaceable> ]
@@ -42,13 +42,6 @@ UPDATE [ ONLY ] <replaceable class="PARAMETER">table_name</replaceable> [ [ AS ]
</para>
<para>
- By default, <command>UPDATE</command> will update rows in the
- specified table and all its subtables. If you wish to only update
- the specific table mentioned, you must use the <literal>ONLY</>
- clause.
- </para>
-
- <para>
There are two ways to modify a table using information contained in
other tables in the database: using sub-selects, or specifying
additional tables in the <literal>FROM</literal> clause. Which
@@ -97,6 +90,11 @@ UPDATE [ ONLY ] <replaceable class="PARAMETER">table_name</replaceable> [ [ AS ]
<listitem>
<para>
The name (optionally schema-qualified) of the table to update.
+ If <literal>ONLY</> is specified before the table name, matching rows
+ are updated in the named table only. If <literal>ONLY</> is not
+ specified, matching rows are also updated in any tables inheriting from
+ the named table. Optionally, <literal>*</> can be specified after the
+ table name to explicitly indicate that descendant tables are included.
</para>
</listitem>
</varlistentry>