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

« back to all changes in this revision

Viewing changes to doc/src/sgml/ddl.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:
2063
2063
  </para>
2064
2064
 
2065
2065
  <para>
 
2066
   You can also write the table name with a trailing <literal>*</>
 
2067
   to explicitly specify that descendant tables are included:
 
2068
 
 
2069
<programlisting>
 
2070
SELECT name, altitude
 
2071
    FROM cities*
 
2072
    WHERE altitude &gt; 500;
 
2073
</programlisting>
 
2074
 
 
2075
   Writing <literal>*</> is not necessary, since this behavior is
 
2076
   the default (unless you have changed the setting of the
 
2077
   <xref linkend="guc-sql-inheritance"> configuration option).
 
2078
   However writing <literal>*</> might be useful to emphasize that
 
2079
   additional tables will be searched.
 
2080
  </para>
 
2081
 
 
2082
  <para>
2066
2083
   In some cases you might wish to know which table a particular row
2067
2084
   originated from. There is a system column called
2068
2085
   <structfield>tableoid</structfield> in each table which can tell you the
2209
2226
   data modification, or schema modification
2210
2227
   (e.g., <literal>SELECT</literal>, <literal>UPDATE</literal>, <literal>DELETE</literal>,
2211
2228
   most variants of <literal>ALTER TABLE</literal>, but
2212
 
   not <literal>INSERT</literal> and <literal>ALTER TABLE ...
 
2229
   not <literal>INSERT</literal> or <literal>ALTER TABLE ...
2213
2230
   RENAME</literal>) typically default to including child tables and
2214
2231
   support the <literal>ONLY</literal> notation to exclude them.
2215
2232
   Commands that do database maintenance and tuning
2216
2233
   (e.g., <literal>REINDEX</literal>, <literal>VACUUM</literal>)
2217
 
   typically only work on individual, physical tables and do no
 
2234
   typically only work on individual, physical tables and do not
2218
2235
   support recursing over inheritance hierarchies.  The respective
2219
 
   behavior of each individual command is documented in the reference
2220
 
   part (<xref linkend="sql-commands">).
 
2236
   behavior of each individual command is documented in its reference
 
2237
   page (<xref linkend="sql-commands">).
2221
2238
  </para>
2222
2239
 
2223
2240
  <para>
2267
2284
   inheritance is useful for your application.
2268
2285
  </para>
2269
2286
 
2270
 
  <note>
2271
 
   <title>Deprecated</title>
2272
 
   <para>
2273
 
     In releases of <productname>PostgreSQL</productname> prior to 7.1, the
2274
 
     default behavior was not to include child tables in queries. This was
2275
 
     found to be error prone and also in violation of the SQL
2276
 
     standard.  You can get the pre-7.1 behavior by turning off the
2277
 
     <xref linkend="guc-sql-inheritance"> configuration
2278
 
     option.
2279
 
   </para>
2280
 
  </note>
2281
 
 
2282
2287
   </sect2>
2283
2288
  </sect1>
2284
2289