Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iSoW7-0007UO-Cd for pgsql-docs@arkaria.postgresql.org; Thu, 07 Nov 2019 20:36:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iSoW4-0000sg-Tu for pgsql-docs@arkaria.postgresql.org; Thu, 07 Nov 2019 20:36:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iSoW4-0000sT-J6 for pgsql-docs@lists.postgresql.org; Thu, 07 Nov 2019 20:36:28 +0000 Received: from mbx.knossos.net.nz ([202.160.48.10]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1iSoVz-0007Ou-39 for pgsql-docs@lists.postgresql.org; Thu, 07 Nov 2019 20:36:25 +0000 Received: from [192.168.77.204] (default-rdns.vocus.co.nz [121.99.202.67] (may be forged)) (authenticated bits=0) by mbx.knossos.net.nz (8.14.4/8.14.4) with ESMTP id xA7KaDLU022137 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 8 Nov 2019 09:36:15 +1300 Subject: Re: Adding a Column documentation is misleading To: Alvaro Herrera , pgsql-docs@lists.postgresql.org References: <20191106131330.GA8130@alvherre.pgsql> From: Gavin Flower Organization: ArchiDevSys Message-ID: Date: Fri, 8 Nov 2019 09:36:13 +1300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: <20191106131330.GA8130@alvherre.pgsql> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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