Commit 0d2a78bf authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

Repair markup to allow clean doc builds.

parent e7112784
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/advanced.sgml,v 1.13 2000/06/09 01:43:55 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/advanced.sgml,v 1.14 2000/06/14 13:12:52 thomas Exp $
--> -->
<chapter id="advanced"> <chapter id="advanced">
...@@ -59,21 +59,22 @@ CREATE TABLE capitals ( ...@@ -59,21 +59,22 @@ CREATE TABLE capitals (
The inheritance hierarchy is a directed acyclic graph. The inheritance hierarchy is a directed acyclic graph.
</para> </para>
</note> </note>
</para>
<para> <para>
For example, the following query finds the names of all cities, For example, the following query finds the names of all cities,
including state capitals, that are located at an altitude including state capitals, that are located at an altitude
over 500ft, the query is: over 500ft, the query is:
<programlisting> <programlisting>
SELECT c.name, c.altitude SELECT c.name, c.altitude
FROM cities c FROM cities c
WHERE c.altitude > 500; WHERE c.altitude > 500;
</programlisting> </programlisting>
which returns: which returns:
<programlisting> <programlisting>
+----------+----------+ +----------+----------+
|name | altitude | |name | altitude |
+----------+----------+ +----------+----------+
...@@ -83,16 +84,16 @@ CREATE TABLE capitals ( ...@@ -83,16 +84,16 @@ CREATE TABLE capitals (
+----------+----------+ +----------+----------+
|Madison | 845 | |Madison | 845 |
+----------+----------+ +----------+----------+
</programlisting> </programlisting>
</para> </para>
<para> <para>
On the other hand, the following query finds On the other hand, the following query finds
all the cities, but not capital cities all the cities, but not capital cities
that are situated at an attitude of 500ft or higher: that are situated at an attitude of 500ft or higher:
<programlisting> <programlisting>
SELECT name, altitude SELECT name, altitude
FROM ONLY cities FROM ONLY cities
WHERE altitude &gt; 500; WHERE altitude &gt; 500;
...@@ -103,30 +104,34 @@ CREATE TABLE capitals ( ...@@ -103,30 +104,34 @@ CREATE TABLE capitals (
+----------+----------+ +----------+----------+
|Mariposa | 1953 | |Mariposa | 1953 |
+----------+----------+ +----------+----------+
</programlisting> </programlisting>
</para> </para>
<para>
Here the <quote>ONLY</quote> before cities indicates that the query should
be run over only cities and not classes below cities in the
inheritance hierarchy. Many of the commands that we
have already discussed -- <command>SELECT</command>,
<command>UPDATE</command> and <command>DELETE</command> --
support this <quote>ONLY</quote> notation.
</para>
Here the <quote>ONLY</quote> before cities indicates that the query should <para>
be run over only cities and not classes below cities in the Deprecated: In previous versions of postgres, the default was not to
inheritance hierarchy. Many of the commands that we get access to child classes. By experience this was found to be error
have already discussed -- <command>SELECT</command>, prone. Under the old syntax, to get the sub-classes you append "*"
<command>UPDATE</command> and <command>DELETE</command> -- to the table name. For example
support this <quote>ONLY</quote> notation.
</para> <programlisting>
<para> SELECT * from cities*;
Deprecated: In previous versions of postgres, the default was not to </programlisting>
get access to child classes. By experience this was found to be error
prone. Under the old syntax, to get the sub-classes you append "*" This old behaviour is still available by using a SET command:
to the table name. For example
<programlisting> <programlisting>
SELECT * from cities*; SET EXAMINE_SUBCLASS TO on;
</programlisting> </programlisting>
This old behaviour is still available by using a SET command... </para>
<programlisting>
SET EXAMINE_SUBCLASS TO on;
</programlisting>
</para>
</sect1> </sect1>
<sect1> <sect1>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/inherit.sgml,v 1.8 2000/06/09 01:43:56 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/inherit.sgml,v 1.9 2000/06/14 13:12:52 thomas Exp $
--> -->
<chapter id="inherit"> <chapter id="inherit">
...@@ -40,6 +40,7 @@ CREATE TABLE capitals UNDER cities ( ...@@ -40,6 +40,7 @@ CREATE TABLE capitals UNDER cities (
The inheritance hierarchy is a actually a directed acyclic graph. The inheritance hierarchy is a actually a directed acyclic graph.
</para> </para>
</note> </note>
</para>
<para> <para>
For example, the following query finds the names of all cities, For example, the following query finds the names of all cities,
...@@ -87,6 +88,7 @@ CREATE TABLE capitals UNDER cities ( ...@@ -87,6 +88,7 @@ CREATE TABLE capitals UNDER cities (
</programlisting> </programlisting>
</para> </para>
<para>
Here the <quote>ONLY</quote> before cities indicates that the query should Here the <quote>ONLY</quote> before cities indicates that the query should
be run over only cities and not classes below cities in the be run over only cities and not classes below cities in the
inheritance hierarchy. Many of the commands that we inheritance hierarchy. Many of the commands that we
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment