@ -1995,6 +1995,23 @@ SELECT name, altitude
<literal>ONLY</literal> keyword.
</para>
<para>
You can also write the table name with a trailing <literal>*</>
to explicitly specify that descendant tables are included:
<programlisting>
SELECT name, altitude
FROM cities*
WHERE altitude > 500;
</programlisting>
Writing <literal>*</> is not necessary, since this behavior is
the default (unless you have changed the setting of the
<xref linkend="guc-sql-inheritance"> configuration option).
However writing <literal>*</> might be useful to emphasize that
additional tables will be searched.
</para>
<para>
In some cases you might wish to know which table a particular row
originated from. There is a system column called
@ -2142,15 +2159,15 @@ VALUES ('New York', NULL, NULL, 'NY');
data modification, or schema modification
(e.g., <literal>SELECT</literal>, <literal>UPDATE</literal>, <literal>DELETE</literal>,
most variants of <literal>ALTER TABLE</literal>, but
not <literal>INSERT</literal> and <literal>ALTER TABLE ...
not <literal>INSERT</literal> or <literal>ALTER TABLE ...
RENAME</literal>) typically default to including child tables and
support the <literal>ONLY</literal> notation to exclude them.
Commands that do database maintenance and tuning
(e.g., <literal>REINDEX</literal>, <literal>VACUUM</literal>)
typically only work on individual, physical tables and do no
typically only work on individual, physical tables and do not
support recursing over inheritance hierarchies. The respective
behavior of each individual command is documented in the reference
part (<xref linkend="sql-commands">).
behavior of each individual command is documented in its reference
page (<xref linkend="sql-commands">).
</para>
<para>
@ -2200,18 +2217,6 @@ VALUES ('New York', NULL, NULL, 'NY');
inheritance is useful for your application.
</para>
<note>
<title>Deprecated</title>
<para>
In releases of <productname>PostgreSQL</productname> prior to 7.1, the
default behavior was not to include child tables in queries. This was
found to be error prone and also in violation of the SQL
standard. You can get the pre-7.1 behavior by turning off the
<xref linkend="guc-sql-inheritance"> configuration
option.
</para>
</note>
</sect2>
</sect1>