~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to doc/src/sgml/ref/delete.sgml

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-02-05 18:13:52 UTC
  • mfrom: (1.1.10) (10.1.5 oneiric-proposed)
  • Revision ID: package-import@ubuntu.com-20130205181352-3kw4f94ilqklzm7c
Tags: 9.1.8-0ubuntu11.10
* New upstream security/bug fix release: (LP: #1116336)
  - Prevent execution of enum_recv from SQL
    The function was misdeclared, allowing a simple SQL command to crash the
    server.  In principle an attacker might be able to use it to examine the
    contents of server memory.  Our thanks to Sumit Soni (via Secunia SVCRP)
    for reporting this issue. (CVE-2013-0255)
  - See HISTORY/changelog.gz for the other bug fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 <refsynopsisdiv>
23
23
<synopsis>
24
24
[ WITH [ RECURSIVE ] <replaceable class="parameter">with_query</replaceable> [, ...] ]
25
 
DELETE FROM [ ONLY ] <replaceable class="PARAMETER">table</replaceable> [ [ AS ] <replaceable class="parameter">alias</replaceable> ]
 
25
DELETE FROM [ ONLY ] <replaceable class="PARAMETER">table</replaceable> [ * ] [ [ AS ] <replaceable class="parameter">alias</replaceable> ]
26
26
    [ USING <replaceable class="PARAMETER">using_list</replaceable> ]
27
27
    [ WHERE <replaceable class="PARAMETER">condition</replaceable> | WHERE CURRENT OF <replaceable class="PARAMETER">cursor_name</replaceable> ]
28
28
    [ RETURNING * | <replaceable class="parameter">output_expression</replaceable> [ [ AS ] <replaceable class="parameter">output_name</replaceable> ] [, ...] ]
48
48
   </tip>
49
49
 
50
50
  <para>
51
 
   By default, <command>DELETE</command> will delete rows in the
52
 
   specified table and all its child tables. If you wish to delete only
53
 
   from the specific table mentioned, you must use the
54
 
   <literal>ONLY</literal> clause.
55
 
  </para>
56
 
 
57
 
  <para>
58
51
   There are two ways to delete rows in a table using information
59
52
   contained in other tables in the database: using sub-selects, or
60
53
   specifying additional tables in the <literal>USING</literal> clause.
97
90
   </varlistentry>
98
91
 
99
92
   <varlistentry>
100
 
    <term><literal>ONLY</></term>
101
 
    <listitem>
102
 
     <para>
103
 
      If specified, delete rows from the named table only.  When not
104
 
      specified, any tables inheriting from the named table are also processed.
105
 
     </para>
106
 
    </listitem>
107
 
   </varlistentry>
108
 
 
109
 
   <varlistentry>
110
93
    <term><replaceable class="parameter">table</replaceable></term>
111
94
    <listitem>
112
95
     <para>
113
 
      The name (optionally schema-qualified) of an existing table.
 
96
      The name (optionally schema-qualified) of the table to delete rows
 
97
      from.  If <literal>ONLY</> is specified before the table name,
 
98
      matching rows are deleted from the named table only.  If
 
99
      <literal>ONLY</> is not specified, matching rows are also deleted
 
100
      from any tables inheriting from the named table.  Optionally,
 
101
      <literal>*</> can be specified after the table name to explicitly
 
102
      indicate that descendant tables are included.
114
103
     </para>
115
104
    </listitem>
116
105
   </varlistentry>