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 1iSL85-0007Zu-T5 for pgsql-docs@arkaria.postgresql.org; Wed, 06 Nov 2019 13:13:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iSL84-0007yQ-Iv for pgsql-docs@arkaria.postgresql.org; Wed, 06 Nov 2019 13:13:44 +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 1iSL84-0007yI-3L for pgsql-docs@lists.postgresql.org; Wed, 06 Nov 2019 13:13:44 +0000 Received: from mail-qk1-x744.google.com ([2607:f8b0:4864:20::744]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iSL7w-0007iY-Md for pgsql-docs@lists.postgresql.org; Wed, 06 Nov 2019 13:13:42 +0000 Received: by mail-qk1-x744.google.com with SMTP id m16so24145408qki.11 for ; Wed, 06 Nov 2019 05:13:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=7lpPHZ4K7d/1dGofk2QP8Kk/wYAaw4/108SY7GFxdMU=; b=iGvXSH65DYe1QedPm2h9uGBDx6iC5oAA88917DntLYQV1OOteBbvrrl6L+Lo9M6ZiJ fZf49WQ4tuyeWtXKnfxNc7KukweLRFiaKimG9ZWty5pgTdu2CV40IiNv66RGptCXhW/d /089EoGqir41oox/sGWlJTgPjCK6ip3gK12R8Vg/7YGaisq54n1YL/rIq97zHcyYhFaK 7yDBcNF4Z9IU0V7XG65ZXhZgGqdvHbDhVWA8F7rCSFgzaV9zAveP3lLX7QG1rvTRxLSE Je+6O031qUtyT1bH49RAXozSvYJn8KwqZEHVBbBPLd2oGJl6QKirKtf04SmSAjMeenIo lX0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=7lpPHZ4K7d/1dGofk2QP8Kk/wYAaw4/108SY7GFxdMU=; b=OZqmW5ulnJ9CbbGrO2HbqT3w86urdIWg8Gx4hAlxdXHdHBvOr016Api287b3ICO7zK LB/RiDEB67FcCb8JYSyxQPS9j5FXYzYesO1TOJ08FXvKTRYCJnWU1rlagCZZs1GYI0Ug sjkhkRHymf7lfOo+KjumqN+497ElM93aBt1q2XDxZ9gdn08th29IV04CP8YDDJrTLVVV MG9pyRdr34c5XgUEIExg09vRTTloJohE7Qp/m6YdrDCB9n0gZKyaX8VkpbcCN29593NU A/wWoPqG0JVqQGEQFZXlfaK+jA4YfmcHoo9yJ8B2URVoiSis08aiMtG5HoIVSlRbd41w v3WQ== X-Gm-Message-State: APjAAAXC+7m9fJa5HVoYjrgkyvxAKvAE+x85s5uOkouthoMGHr6RsJD5 RJvfB81rUJR1pyItMAScxh+AQ7SVbohjOg== X-Google-Smtp-Source: APXvYqy+BXDsWdX1Jv3Qmxp1x4rAyEJ6ja5lDkb6DUxLutt8WM9soNdCNxm42+oDlfEus0dYXapeqg== X-Received: by 2002:a37:8d5:: with SMTP id 204mr1921535qki.317.1573046015524; Wed, 06 Nov 2019 05:13:35 -0800 (PST) Received: from nimloth.alvh.no-ip.org (ip-11-2-52-196.nyc.us.northamericancoax.com. [196.52.2.11]) by smtp.gmail.com with ESMTPSA id l93sm12575200qtd.86.2019.11.06.05.13.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2019 05:13:34 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 5B346300AB4; Wed, 6 Nov 2019 10:13:30 -0300 (-03) Date: Wed, 6 Nov 2019 10:13:30 -0300 From: Alvaro Herrera To: gavinflower@archidevsys.co.nz, pgsql-docs@lists.postgresql.org Subject: Re: Adding a Column documentation is misleading Message-ID: <20191106131330.GA8130@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <157301068439.14260.3440469821975939421@wrigleys.postgresql.org> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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