Re: Adding a Column documentation is misleading

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Adding a Column documentation is misleading
Дата
Msg-id 20191106131330.GA8130@alvherre.pgsql
обсуждение исходный текст
Ответ на Adding a Column documentation is misleading  (PG Doc comments form <noreply@postgresql.org>)
Ответы Re: Adding a Column documentation is misleading  (Gavin Flower <GavinFlower@archidevsys.co.nz>)
Список pgsql-docs
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.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



В списке pgsql-docs по дате отправления:

Предыдущее
От: Eugen Konkov
Дата:
Сообщение: Re: Why 'infinity' is not in range '[2019-01-02, infinity]'?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Why 'infinity' is not in range '[2019-01-02, infinity]'?