Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UgyLB-0002Co-Rm for pgsql-bugs@arkaria.postgresql.org; Mon, 27 May 2013 14:24:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UgyLB-0008JM-CA for pgsql-bugs@arkaria.postgresql.org; Mon, 27 May 2013 14:24:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UgyLA-0008It-MD for pgsql-bugs@postgresql.org; Mon, 27 May 2013 14:24:00 +0000 Received: from cl-262.qas-01.us.sixxs.net ([2001:4830:1600:105::2] helo=tamriel.snowman.net) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UgyL3-0002bj-Ft for pgsql-bugs@postgresql.org; Mon, 27 May 2013 14:24:00 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 76D3A222E7; Mon, 27 May 2013 10:23:52 -0400 (EDT) Date: Mon, 27 May 2013 10:23:52 -0400 From: Stephen Frost To: maxim.boguk@gmail.com Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8176: problem with the "ALTER TYPE name RENAME TO new_name [ CASCADE | RESTRICT ]" syntax Message-ID: <20130527142352.GT8597@tamriel.snowman.net> References: <20130527123648.GM8597@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4AfY4lbNVy6SI0IG" Content-Disposition: inline In-Reply-To: <20130527123648.GM8597@tamriel.snowman.net> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.2.0-4-amd64 (x86_64) X-Uptime: 10:21:01 up 1 day, 19:54, 4 users, load average: 0.12, 0.11, 0.13 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org --4AfY4lbNVy6SI0IG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Maxim, * Stephen Frost (sfrost@snowman.net) wrote: > * maxim.boguk@gmail.com (maxim.boguk@gmail.com) wrote: > > It seems that documentation wrong or [ CASCADE | RESTRICT ] feature of = ALTER > > TYPE ... RENAME TO isn't implemented. >=20 > Actually, I'm pretty sure it's implemented but the grammar for it was > broken during refactoring to have all the ALTER .. RENAME operations go > through the same code paths. Nope, I was wrong- this looks to be a documentation bug, actually. The documentation should be: ALTER TYPE name RENAME ATTRIBUTE attribute_name TO new_attribute_name [ CAS= CADE | RESTRICT ] ALTER TYPE name RENAME TO new_name Which makes more sense (to me at least) anyway. Do you have a need for this version: ALTER TYPE name RENAME TO new_name [ CASCADE | RESTRICT ] or were you just playing with things..? Thanks, Stephen --4AfY4lbNVy6SI0IG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlGjbHgACgkQrzgMPqB3kiinHwCdGPzvZzdTEiMlRy1konNO9Wch 314Anjm8z7g58xsJfl3TgvyHwYySwgUq =5YdO -----END PGP SIGNATURE----- --4AfY4lbNVy6SI0IG--