1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-25 13:17:41 +03:00

docs: land height is "elevation", not "altitude"

See https://mapscaping.com/blogs/geo-candy/what-is-the-difference-between-elevation-relief-and-altitude
No patching of regression tests.

Reported-by: taf1@cornell.edu

Discussion: https://postgr.es/m/158506544539.679.2278386310645558048@wrigleys.postgresql.org

Backpatch-through: 9.5
This commit is contained in:
Bruce Momjian
2020-04-22 16:23:19 -04:00
parent 748507c780
commit 92c12e46d5
2 changed files with 56 additions and 56 deletions

View File

@@ -585,20 +585,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
@@ -612,7 +612,7 @@ CREATE VIEW cities AS
CREATE TABLE cities (
name text,
population real,
altitude int -- (in ft)
elevation int -- (in ft)
);
CREATE TABLE capitals (
@@ -624,7 +624,7 @@ CREATE TABLE capitals (
<para>
In this case, a row of <classname>capitals</classname>
<firstterm>inherits</firstterm> all columns (<structfield>name</structfield>,
<structfield>population</structfield>, and <structfield>altitude</structfield>) 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>
@@ -636,23 +636,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>
@@ -660,19 +660,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>