pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
terminology in example
6+ messages / 3 participants
[nested] [flat]

Commits from this thread:
  2020-04-22 92c12e46d5 b3cbbd0b6e 34b70208a3 c5abde5f35 0b1ad96a50 b0b2168538  docs:  land height is "elevation", not "altitude"
* terminology in example
@ 2020-03-24 15:57 PG Doc comments form <noreply@postgresql.org>
  2020-03-24 17:41 ` Re: terminology in example Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 6+ messages in thread

From: PG Doc comments form @ 2020-03-24 15:57 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: taf1@cornell.edu

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/12/ddl-inherit.html
Description:

In the example on this page: 
https://www.postgresql.org/docs/current/ddl-inherit.html
the word 'altitude' should be replaced with 'elevation'.


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: terminology in example
  2020-03-24 15:57 terminology in example PG Doc comments form <noreply@postgresql.org>
@ 2020-03-24 17:41 ` Bruce Momjian <bruce@momjian.us>
  2020-03-31 23:10   ` Re: terminology in example Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 6+ messages in thread

From: Bruce Momjian @ 2020-03-24 17:41 UTC (permalink / raw)
  To: taf1@cornell.edu; pgsql-docs@lists.postgresql.org

On Tue, Mar 24, 2020 at 03:57:25PM +0000, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
> 
> Page: https://www.postgresql.org/docs/12/ddl-inherit.html
> Description:
> 
> In the example on this page: 
> https://www.postgresql.org/docs/current/ddl-inherit.html
> the word 'altitude' should be replaced with 'elevation'.

Yes, I see your point:

	https://mapscaping.com/blogs/geo-candy/what-is-the-difference-between-elevation-relief-and-altitude

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: terminology in example
  2020-03-24 15:57 terminology in example PG Doc comments form <noreply@postgresql.org>
  2020-03-24 17:41 ` Re: terminology in example Bruce Momjian <bruce@momjian.us>
@ 2020-03-31 23:10   ` Bruce Momjian <bruce@momjian.us>
  2020-04-01 06:37     ` Re: terminology in example Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 1 reply; 6+ messages in thread

From: Bruce Momjian @ 2020-03-31 23:10 UTC (permalink / raw)
  To: taf1@cornell.edu; pgsql-docs@lists.postgresql.org

On Tue, Mar 24, 2020 at 01:41:41PM -0400, Bruce Momjian wrote:
> On Tue, Mar 24, 2020 at 03:57:25PM +0000, PG Doc comments form wrote:
> > The following documentation comment has been logged on the website:
> > 
> > Page: https://www.postgresql.org/docs/12/ddl-inherit.html
> > Description:
> > 
> > In the example on this page: 
> > https://www.postgresql.org/docs/current/ddl-inherit.html
> > the word 'altitude' should be replaced with 'elevation'.
> 
> Yes, I see your point:
> 
> 	https://mapscaping.com/blogs/geo-candy/what-is-the-difference-between-elevation-relief-and-altitude

The attached patch fixes the problem.  The regression tests also have
many mentions of "altitude."  Should those be changed too?

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +

Attachments:

elevation.diff (text/x-diff, 7.6K) download diff --git a/doc/src/sgml/advanced.sgml b/doc/src/sgml/advanced.sgml index ae5f3fac75..be14d15b3f 100644 --- a/doc/src/sgml/advanced.sgml +++ b/doc/src/sgml/advanced.sgml @@ -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> diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index ab27645319..d84214f277 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -3157,7 +3157,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 ( @@ -3177,40 +3177,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> @@ -3229,9 +3229,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>*</literal> is not necessary, since this behavior is always @@ -3246,19 +3246,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 @@ -3266,19 +3266,19 @@ WHERE c.altitude &gt; 500; <structname>pg_class</structname> 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> @@ -3287,9 +3287,9 @@ WHERE c.altitude &gt; 500 AND c.tableoid = p.oid; alias 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> @@ -3299,7 +3299,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
^ permalink raw reply [nested|flat] 6+ messages in thread

* Re: terminology in example
  2020-03-24 15:57 terminology in example PG Doc comments form <noreply@postgresql.org>
  2020-03-24 17:41 ` Re: terminology in example Bruce Momjian <bruce@momjian.us>
  2020-03-31 23:10   ` Re: terminology in example Bruce Momjian <bruce@momjian.us>
@ 2020-04-01 06:37     ` Laurenz Albe <laurenz.albe@cybertec.at>
  2020-04-02 00:27       ` Re: terminology in example Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 6+ messages in thread

From: Laurenz Albe @ 2020-04-01 06:37 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; taf1@cornell.edu; pgsql-docs@lists.postgresql.org

On Tue, 2020-03-31 at 19:10 -0400, Bruce Momjian wrote:

> The attached patch fixes the problem.  The regression tests also have
> many mentions of "altitude."  Should those be changed too?

I don't think that is necessary.
Names don't matter in the regression tests.

> --- a/doc/src/sgml/advanced.sgml
> +++ b/doc/src/sgml/advanced.sgml
> @@ -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)
>  );
> 

> @@ -612,7 +612,7 @@ CREATE VIEW cities AS
>  CREATE TABLE cities (
>    name       text,
>    population real,
> -  altitude   int     -- (in ft)
> +  elevation   int     -- (in ft)
>  );

The "int" should be aligned with the rest (delete one space).

Yours,
Laurenz Albe






^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: terminology in example
  2020-03-24 15:57 terminology in example PG Doc comments form <noreply@postgresql.org>
  2020-03-24 17:41 ` Re: terminology in example Bruce Momjian <bruce@momjian.us>
  2020-03-31 23:10   ` Re: terminology in example Bruce Momjian <bruce@momjian.us>
  2020-04-01 06:37     ` Re: terminology in example Laurenz Albe <laurenz.albe@cybertec.at>
@ 2020-04-02 00:27       ` Bruce Momjian <bruce@momjian.us>
  2020-04-22 20:23         ` Re: terminology in example Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 6+ messages in thread

From: Bruce Momjian @ 2020-04-02 00:27 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: taf1@cornell.edu; pgsql-docs@lists.postgresql.org

On Wed, Apr  1, 2020 at 08:37:30AM +0200, Laurenz Albe wrote:
> On Tue, 2020-03-31 at 19:10 -0400, Bruce Momjian wrote:
> 
> > The attached patch fixes the problem.  The regression tests also have
> > many mentions of "altitude."  Should those be changed too?
> 
> I don't think that is necessary.
> Names don't matter in the regression tests.

Agreed.

> > @@ -612,7 +612,7 @@ CREATE VIEW cities AS
> >  CREATE TABLE cities (
> >    name       text,
> >    population real,
> > -  altitude   int     -- (in ft)
> > +  elevation   int     -- (in ft)
> >  );
> 
> The "int" should be aligned with the rest (delete one space).

Fixed, thanks.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: terminology in example
  2020-03-24 15:57 terminology in example PG Doc comments form <noreply@postgresql.org>
  2020-03-24 17:41 ` Re: terminology in example Bruce Momjian <bruce@momjian.us>
  2020-03-31 23:10   ` Re: terminology in example Bruce Momjian <bruce@momjian.us>
  2020-04-01 06:37     ` Re: terminology in example Laurenz Albe <laurenz.albe@cybertec.at>
  2020-04-02 00:27       ` Re: terminology in example Bruce Momjian <bruce@momjian.us>
@ 2020-04-22 20:23         ` Bruce Momjian <bruce@momjian.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Bruce Momjian @ 2020-04-22 20:23 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: taf1@cornell.edu; pgsql-docs@lists.postgresql.org


Patch applied back to 9.5, thanks.

---------------------------------------------------------------------------

On Wed, Apr  1, 2020 at 08:27:59PM -0400, Bruce Momjian wrote:
> On Wed, Apr  1, 2020 at 08:37:30AM +0200, Laurenz Albe wrote:
> > On Tue, 2020-03-31 at 19:10 -0400, Bruce Momjian wrote:
> > 
> > > The attached patch fixes the problem.  The regression tests also have
> > > many mentions of "altitude."  Should those be changed too?
> > 
> > I don't think that is necessary.
> > Names don't matter in the regression tests.
> 
> Agreed.
> 
> > > @@ -612,7 +612,7 @@ CREATE VIEW cities AS
> > >  CREATE TABLE cities (
> > >    name       text,
> > >    population real,
> > > -  altitude   int     -- (in ft)
> > > +  elevation   int     -- (in ft)
> > >  );
> > 
> > The "int" should be aligned with the rest (delete one space).
> 
> Fixed, thanks.
> 
> -- 
>   Bruce Momjian  <bruce@momjian.us>        https://momjian.us
>   EnterpriseDB                             https://enterprisedb.com
> 
> + As you are, so once was I.  As I am, so you will be. +
> +                      Ancient Roman grave inscription +
> 
> 

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +





^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2020-04-22 20:23 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-03-24 15:57 terminology in example PG Doc comments form <noreply@postgresql.org>
2020-03-24 17:41 ` Bruce Momjian <bruce@momjian.us>
2020-03-31 23:10   ` Bruce Momjian <bruce@momjian.us>
2020-04-01 06:37     ` Laurenz Albe <laurenz.albe@cybertec.at>
2020-04-02 00:27       ` Bruce Momjian <bruce@momjian.us>
2020-04-22 20:23         ` Bruce Momjian <bruce@momjian.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox