1
1
<!--
2
- $Header: /cvsroot/pgsql/doc/src/sgml/advanced.sgml,v 1.13 2000/06/09 01:43:55 momjian Exp $
2
+ $Header: /cvsroot/pgsql/doc/src/sgml/advanced.sgml,v 1.14 2000/06/14 13:12:52 thomas Exp $
3
3
-->
4
4
5
5
<chapter id="advanced">
@@ -59,21 +59,22 @@ CREATE TABLE capitals (
59
59
The inheritance hierarchy is a directed acyclic graph.
60
60
</para>
61
61
</note>
62
+ </para>
62
63
63
- <para>
64
- For example, the following query finds the names of all cities,
65
- including state capitals, that are located at an altitude
66
- over 500ft, the query is:
64
+ <para>
65
+ For example, the following query finds the names of all cities,
66
+ including state capitals, that are located at an altitude
67
+ over 500ft, the query is:
67
68
68
- <programlisting>
69
- SELECT c.name, c.altitude
69
+ <programlisting>
70
+ SELECT c.name, c.altitude
70
71
FROM cities c
71
72
WHERE c.altitude > 500;
72
- </programlisting>
73
+ </programlisting>
73
74
74
- which returns:
75
+ which returns:
75
76
76
- <programlisting>
77
+ <programlisting>
77
78
+----------+----------+
78
79
|name | altitude |
79
80
+----------+----------+
@@ -83,16 +84,16 @@ CREATE TABLE capitals (
83
84
+----------+----------+
84
85
|Madison | 845 |
85
86
+----------+----------+
86
- </programlisting>
87
- </para>
87
+ </programlisting>
88
+ </para>
88
89
89
- <para>
90
- On the other hand, the following query finds
91
- all the cities, but not capital cities
92
- that are situated at an attitude of 500ft or higher:
90
+ <para>
91
+ On the other hand, the following query finds
92
+ all the cities, but not capital cities
93
+ that are situated at an attitude of 500ft or higher:
93
94
94
- <programlisting>
95
- SELECT name, altitude
95
+ <programlisting>
96
+ SELECT name, altitude
96
97
FROM ONLY cities
97
98
WHERE altitude > 500;
98
99
@@ -103,30 +104,34 @@ CREATE TABLE capitals (
103
104
+----------+----------+
104
105
|Mariposa | 1953 |
105
106
+----------+----------+
106
- </programlisting>
107
- </para>
107
+ </programlisting>
108
+ </para>
108
109
110
+ <para>
111
+ Here the <quote>ONLY</quote> before cities indicates that the query should
112
+ be run over only cities and not classes below cities in the
113
+ inheritance hierarchy. Many of the commands that we
114
+ have already discussed -- <command>SELECT</command>,
115
+ <command>UPDATE</command> and <command>DELETE</command> --
116
+ support this <quote>ONLY</quote> notation.
117
+ </para>
109
118
110
- Here the <quote>ONLY</quote> before cities indicates that the query should
111
- be run over only cities and not classes below cities in the
112
- inheritance hierarchy. Many of the commands that we
113
- have already discussed -- <command>SELECT</command>,
114
- <command>UPDATE</command> and <command>DELETE</command> --
115
- support this <quote>ONLY</quote> notation.
116
- </para>
117
- <para>
118
- Deprecated: In previous versions of postgres, the default was not to
119
- get access to child classes. By experience this was found to be error
120
- prone. Under the old syntax, to get the sub-classes you append "*"
121
- to the table name. For example
122
- <programlisting>
123
- SELECT * from cities*;
124
- </programlisting>
125
- This old behaviour is still available by using a SET command...
126
- <programlisting>
127
- SET EXAMINE_SUBCLASS TO on;
128
- </programlisting>
129
- </para>
119
+ <para>
120
+ Deprecated: In previous versions of postgres, the default was not to
121
+ get access to child classes. By experience this was found to be error
122
+ prone. Under the old syntax, to get the sub-classes you append "*"
123
+ to the table name. For example
124
+
125
+ <programlisting>
126
+ SELECT * from cities*;
127
+ </programlisting>
128
+
129
+ This old behaviour is still available by using a SET command:
130
+
131
+ <programlisting>
132
+ SET EXAMINE_SUBCLASS TO on;
133
+ </programlisting>
134
+ </para>
130
135
</sect1>
131
136
132
137
<sect1>
0 commit comments