Re: Adding a Column documentation is misleading

From: Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Adding a Column documentation is misleading
Date: 2019-11-07 20:36:13
Message-ID: d3143650-7268-8ae3-6814-fa24760fa709@archidevsys.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On 07/11/2019 02:13, Alvaro Herrera wrote:
> On 2019-Nov-06, PG Doc comments form wrote:
>
>> Page: https://www.postgresql.org/docs/12/ddl-alter.html
>> Description:
>>
>> In 5.6.1. Adding a Column, there is a kind of example 'ALTER TABLE products
>> ADD COLUMN description text;'
>>
>> The words 'description' and 'text' are misleading -- as according to the
>> formal documentation of the SQL command
>> (https://www.postgresql.org/docs/12/sql-altertable.html), they should be
>> 'column_name' and 'data_type'.
> Well, it's an example, so "description" is the column name and "text" is
> its data type. If you had a table called products, you could run that
> command and it would work just fine (assuming you don't already have a
> column called description, doh).
>
> Maybe the example could be made clearer by using some other column name
> and some other data type, so that they don't resemble english prose or
> keywords. Maybe "alter table cities add column year_founded integer".
> Do you want to propose something better than that?
>
>> A similar problem exists for removing a column, and other actions.
> Let's hear your proposed changes.
>
Now it's explained, it is obvious!

Sorry, for the noise.

Cheers,
Gavin

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2019-11-07 21:26:55 Re: Does 'instead of delete' trigger support modification of OLD
Previous Message Daniel Gustafsson 2019-11-07 18:55:22 Re: The word "virgin" used incorrectly and probably better off replaced