mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Provide adequate documentation of the "table_name *" notation.
Somewhere along the line, somebody decided to remove all trace of this notation from the documentation text. It was still in the command syntax synopses, or at least some of them, but with no indication what it meant. This will not do, as evidenced by the confusion apparent in bug #7543; even if the notation is now unnecessary, people will find it in legacy SQL code and need to know what it does.
This commit is contained in:
@@ -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> ]
|
||||
@@ -41,13 +41,6 @@ UPDATE [ ONLY ] <replaceable class="PARAMETER">table_name</replaceable> [ [ AS ]
|
||||
columns not explicitly modified retain their previous values.
|
||||
</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
|
||||
@@ -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>
|
||||
|
Reference in New Issue
Block a user