Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
291c875f
Commit
291c875f
authored
Apr 13, 2002
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update/correct inheritance examples.
parent
6f2c0d47
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
37 deletions
+24
-37
doc/src/sgml/inherit.sgml
doc/src/sgml/inherit.sgml
+24
-37
No files found.
doc/src/sgml/inherit.sgml
View file @
291c875f
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/inherit.sgml,v 1.1
8 2002/01/07 02:29:12 petere
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/inherit.sgml,v 1.1
9 2002/04/13 17:17:29 tgl
Exp $
-->
-->
<chapter id="inherit">
<chapter id="inherit">
...
@@ -56,35 +56,28 @@ SELECT name, altitude
...
@@ -56,35 +56,28 @@ SELECT name, altitude
which returns:
which returns:
<programlisting>
<programlisting>
+----------+----------+
name | altitude
|name | altitude |
-----------+----------
+----------+----------+
Las Vegas | 2174
|Las Vegas | 2174 |
Mariposa | 1953
+----------+----------+
Madison | 845
|Mariposa | 1953 |
+----------+----------+
|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 that are not state capitals and
all the cities that are not state capitals and
are situated at an altitude o
f 500ft or higher
:
are situated at an altitude o
ver 500ft
:
<programlisting>
<programlisting>
SELECT name, altitude
SELECT name, altitude
FROM ONLY cities
FROM ONLY cities
WHERE altitude > 500;
WHERE altitude > 500;
+----------+----------+
name | altitude
|name | altitude |
-----------+----------
+----------+----------+
Las Vegas | 2174
|Las Vegas | 2174 |
Mariposa | 1953
+----------+----------+
|Mariposa | 1953 |
+----------+----------+
</programlisting>
</programlisting>
</para>
</para>
...
@@ -112,18 +105,16 @@ SELECT name, altitude
...
@@ -112,18 +105,16 @@ SELECT name, altitude
which returns:
which returns:
<programlisting>
<programlisting>
+---------+----------+----------+
tableoid | name | altitude
|tableoid |name | altitude |
----------+-----------+----------
+---------+----------+----------+
139793 | Las Vegas | 2174
|37292 |Las Vegas | 2174 |
139793 | Mariposa | 1953
+---------+----------+----------+
139798 | Madison | 845
|37280 |Mariposa | 1953 |
+---------+----------+----------+
|37280 |Madison | 845 |
+---------+----------+----------+
</programlisting>
</programlisting>
If you do a join with pg_class you can see the actual table name:
(If you try to reproduce this example, you will probably get different
numeric OIDs.) By doing a join with pg_class you can see the actual table
names:
<programlisting>
<programlisting>
SELECT p.relname, c.name, c.altitude
SELECT p.relname, c.name, c.altitude
...
@@ -134,15 +125,11 @@ SELECT name, altitude
...
@@ -134,15 +125,11 @@ SELECT name, altitude
which returns:
which returns:
<programlisting>
<programlisting>
+---------+----------+----------+
relname | name | altitude
|relname |name | altitude |
----------+-----------+----------
+---------+----------+----------+
cities | Las Vegas | 2174
|capitals |Las Vegas | 2174 |
cities | Mariposa | 1953
+---------+----------+----------+
capitals | Madison | 845
|cities |Mariposa | 1953 |
+---------+----------+----------+
|cities |Madison | 845 |
+---------+----------+----------+
</programlisting>
</programlisting>
</para>
</para>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment