docs: land height is "elevation", not "altitude"
authorBruce Momjian <[email protected]>
Wed, 22 Apr 2020 20:23:19 +0000 (16:23 -0400)
committerBruce Momjian <[email protected]>
Wed, 22 Apr 2020 20:23:19 +0000 (16:23 -0400)
See https://mapscaping.com/blogs/geo-candy/what-is-the-difference-between-elevation-relief-and-altitude
No patching of regression tests.

Reported-by: [email protected]
Discussion: https://postgr.es/m/158506544539.679.2278386310645558048@wrigleys.postgresql.org

Backpatch-through: 9.5

doc/src/sgml/advanced.sgml
doc/src/sgml/ddl.sgml

index 55ab445b045bf9d0eaa9c5496d6c3df9f0579f13..9ec389dda1b818b585f2d26e82fc0bf3d4ccc587 100644 (file)
@@ -586,20 +586,20 @@ SELECT sum(salary) OVER w, avg(salary) OVER w
 CREATE TABLE capitals (
   name       text,
   population real,
-  altitude   int,    -- (in ft)
+  elevation  int,    -- (in ft)
   state      char(2)
 );
 
 CREATE TABLE non_capitals (
   name       text,
   population real,
-  altitude   int     -- (in ft)
+  elevation  int     -- (in ft)
 );
 
 CREATE VIEW cities AS
-  SELECT name, population, altitude FROM capitals
+  SELECT name, population, elevation FROM capitals
     UNION
-  SELECT name, population, altitude FROM non_capitals;
+  SELECT name, population, elevation FROM non_capitals;
 </programlisting>
 
     This works OK as far as querying goes, but it gets ugly when you
@@ -613,7 +613,7 @@ CREATE VIEW cities AS
 CREATE TABLE cities (
   name       text,
   population real,
-  altitude   int     -- (in ft)
+  elevation  int     -- (in ft)
 );
 
 CREATE TABLE capitals (
@@ -625,7 +625,7 @@ CREATE TABLE capitals (
    <para>
     In this case, a row of <classname>capitals</classname>
     <firstterm>inherits</firstterm> all columns (<structfield>name</>,
-    <structfield>population</>, and <structfield>altitude</>) from its
+    <structfield>population</structfield>, and <structfield>elevation</structfield>) from its
     <firstterm>parent</firstterm>, <classname>cities</classname>.  The
     type of the column <structfield>name</structfield> is
     <type>text</type>, a native <productname>PostgreSQL</productname>
@@ -637,23 +637,23 @@ CREATE TABLE capitals (
 
    <para>
     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 elevation
     over 500 feet:
 
 <programlisting>
-SELECT name, altitude
+SELECT name, elevation
   FROM cities
-  WHERE altitude &gt; 500;
+  WHERE elevation &gt; 500;
 </programlisting>
 
     which returns:
 
 <screen>
-   name    | altitude
------------+----------
- Las Vegas |     2174
- Mariposa  |     1953
- Madison   |      845
+   name    | elevation
+-----------+-----------
+ Las Vegas |      2174
+ Mariposa  |      1953
+ Madison   |       845
 (3 rows)
 </screen>
    </para>
@@ -661,19 +661,19 @@ SELECT name, altitude
    <para>
     On the other hand, the  following  query  finds
     all  the cities that are not state capitals and
-    are situated at an altitude over 500 feet:
+    are situated at an elevation over 500 feet:
 
 <programlisting>
-SELECT name, altitude
+SELECT name, elevation
     FROM ONLY cities
-    WHERE altitude &gt; 500;
+    WHERE elevation &gt; 500;
 </programlisting>
 
 <screen>
-   name    | altitude
------------+----------
- Las Vegas |     2174
- Mariposa  |     1953
+   name    | elevation
+-----------+-----------
+ Las Vegas |      2174
+ Mariposa  |      1953
 (2 rows)
 </screen>
    </para>
index 36f461d71499b2cf2802f127dae81c77e519043b..f508ddee1ad6de4a8bf7994975fcf0f6a90141bc 100644 (file)
@@ -2521,7 +2521,7 @@ REVOKE CREATE ON SCHEMA public FROM PUBLIC;
 CREATE TABLE cities (
     name            text,
     population      float,
-    altitude        int     -- in feet
+    elevation       int     -- in feet
 );
 
 CREATE TABLE capitals (
@@ -2541,40 +2541,40 @@ CREATE TABLE capitals (
    rows of a table or all rows of a table plus all of its descendant tables.
    The latter behavior is the default.
    For example, the following query finds the names of all cities,
-   including state capitals, that are located at an altitude over
+   including state capitals, that are located at an elevation over
    500 feet:
 
 <programlisting>
-SELECT name, altitude
+SELECT name, elevation
     FROM cities
-    WHERE altitude &gt; 500;
+    WHERE elevation &gt; 500;
 </programlisting>
 
    Given the sample data from the <productname>PostgreSQL</productname>
    tutorial (see <xref linkend="tutorial-sql-intro">), this returns:
 
 <programlisting>
-   name    | altitude
------------+----------
- Las Vegas |     2174
- Mariposa  |     1953
- Madison   |      845
+   name    | elevation
+-----------+-----------
+ Las Vegas |      2174
+ Mariposa  |      1953
+ Madison   |       845
 </programlisting>
   </para>
 
   <para>
    On the other hand, the following query finds all the cities that
-   are not state capitals and are situated at an altitude over 500 feet:
+   are not state capitals and are situated at an elevation over 500 feet:
 
 <programlisting>
-SELECT name, altitude
+SELECT name, elevation
     FROM ONLY cities
-    WHERE altitude &gt; 500;
+    WHERE elevation &gt; 500;
 
-   name    | altitude
------------+----------
- Las Vegas |     2174
- Mariposa  |     1953
+   name    | elevation
+-----------+-----------
+ Las Vegas |      2174
+ Mariposa  |      1953
 </programlisting>
   </para>
 
@@ -2593,9 +2593,9 @@ SELECT name, altitude
    to explicitly specify that descendant tables are included:
 
 <programlisting>
-SELECT name, altitude
+SELECT name, elevation
     FROM cities*
-    WHERE altitude &gt; 500;
+    WHERE elevation &gt; 500;
 </programlisting>
 
    Writing <literal>*</> is not necessary, since this behavior is
@@ -2612,19 +2612,19 @@ SELECT name, altitude
    originating table:
 
 <programlisting>
-SELECT c.tableoid, c.name, c.altitude
+SELECT c.tableoid, c.name, c.elevation
 FROM cities c
-WHERE c.altitude &gt; 500;
+WHERE c.elevation &gt; 500;
 </programlisting>
 
    which returns:
 
 <programlisting>
- tableoid |   name    | altitude
-----------+-----------+----------
-   139793 | Las Vegas |     2174
-   139793 | Mariposa  |     1953
-   139798 | Madison   |      845
+ tableoid |   name    | elevation
+----------+-----------+-----------
+   139793 | Las Vegas |      2174
+   139793 | Mariposa  |      1953
+   139798 | Madison   |       845
 </programlisting>
 
    (If you try to reproduce this example, you will probably get
@@ -2632,19 +2632,19 @@ WHERE c.altitude &gt; 500;
    <structname>pg_class</> you can see the actual table names:
 
 <programlisting>
-SELECT p.relname, c.name, c.altitude
+SELECT p.relname, c.name, c.elevation
 FROM cities c, pg_class p
-WHERE c.altitude &gt; 500 AND c.tableoid = p.oid;
+WHERE c.elevation &gt; 500 AND c.tableoid = p.oid;
 </programlisting>
 
    which returns:
 
 <programlisting>
- relname  |   name    | altitude
-----------+-----------+----------
- cities   | Las Vegas |     2174
- cities   | Mariposa  |     1953
- capitals | Madison   |      845
+ relname  |   name    | elevation
+----------+-----------+-----------
+ cities   | Las Vegas |      2174
+ cities   | Mariposa  |      1953
+ capitals | Madison   |       845
 </programlisting>
   </para>
 
@@ -2653,9 +2653,9 @@ WHERE c.altitude &gt; 500 AND c.tableoid = p.oid;
    pseudo-type, which will print the table OID symbolically:
 
 <programlisting>
-SELECT c.tableoid::regclass, c.name, c.altitude
+SELECT c.tableoid::regclass, c.name, c.elevation
 FROM cities c
-WHERE c.altitude &gt; 500;
+WHERE c.elevation &gt; 500;
 </programlisting>
   </para>
 
@@ -2665,7 +2665,7 @@ WHERE c.altitude &gt; 500;
    other tables in the inheritance hierarchy. In our example, the
    following <command>INSERT</command> statement will fail:
 <programlisting>
-INSERT INTO cities (name, population, altitude, state)
+INSERT INTO cities (name, population, elevation, state)
 VALUES ('Albany', NULL, NULL, 'NY');
 </programlisting>
    We might hope that the data would somehow be routed to the