1
0
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:
Tom Lane
2012-09-17 14:59:31 -04:00
parent b2e3bea3af
commit 3c64342c86
9 changed files with 104 additions and 73 deletions

View File

@@ -22,7 +22,7 @@ PostgreSQL documentation
<refsynopsisdiv>
<synopsis>
[ WITH [ RECURSIVE ] <replaceable class="parameter">with_query</replaceable> [, ...] ]
DELETE FROM [ ONLY ] <replaceable class="PARAMETER">table_name</replaceable> [ [ AS ] <replaceable class="parameter">alias</replaceable> ]
DELETE FROM [ ONLY ] <replaceable class="PARAMETER">table_name</replaceable> [ * ] [ [ AS ] <replaceable class="parameter">alias</replaceable> ]
[ USING <replaceable class="PARAMETER">using_list</replaceable> ]
[ WHERE <replaceable class="PARAMETER">condition</replaceable> | WHERE CURRENT OF <replaceable class="PARAMETER">cursor_name</replaceable> ]
[ RETURNING * | <replaceable class="parameter">output_expression</replaceable> [ [ AS ] <replaceable class="parameter">output_name</replaceable> ] [, ...] ]
@@ -47,13 +47,6 @@ DELETE FROM [ ONLY ] <replaceable class="PARAMETER">table_name</replaceable> [ [
</para>
</tip>
<para>
By default, <command>DELETE</command> will delete rows in the
specified table and all its child tables. If you wish to delete only
from the specific table mentioned, you must use the
<literal>ONLY</literal> clause.
</para>
<para>
There are two ways to delete rows in a table using information
contained in other tables in the database: using sub-selects, or
@@ -96,21 +89,17 @@ DELETE FROM [ ONLY ] <replaceable class="PARAMETER">table_name</replaceable> [ [
</listitem>
</varlistentry>
<varlistentry>
<term><literal>ONLY</></term>
<listitem>
<para>
If specified, delete rows from the named table only. When not
specified, any tables inheriting from the named table are also processed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">table_name</replaceable></term>
<listitem>
<para>
The name (optionally schema-qualified) of an existing table.
The name (optionally schema-qualified) of the table to delete rows
from. If <literal>ONLY</> is specified before the table name,
matching rows are deleted from the named table only. If
<literal>ONLY</> is not specified, matching rows are also deleted
from 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>