Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XwDyj-0000vF-Js for pgsql-bugs@arkaria.postgresql.org; Wed, 03 Dec 2014 17:44:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XwDyj-0006cL-2Y for pgsql-bugs@arkaria.postgresql.org; Wed, 03 Dec 2014 17:44:41 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XwDyi-0006aL-5Y for pgsql-bugs@postgresql.org; Wed, 03 Dec 2014 17:44:40 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XwDye-0003hx-TZ for pgsql-bugs@postgresql.org; Wed, 03 Dec 2014 17:44:38 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id sB3HiYaf019735; Wed, 3 Dec 2014 12:44:34 -0500 From: Tom Lane To: Flavio Henrique Araque Gurgel cc: pgsql-bugs@postgresql.org, osalm@mirakl.com Subject: Re: ALTER TABLE documentation or parser bug In-reply-to: <547F462E.8090001@gmail.com> References: <547F462E.8090001@gmail.com> Comments: In-reply-to Flavio Henrique Araque Gurgel message dated "Wed, 03 Dec 2014 18:19:42 +0100" Date: Wed, 03 Dec 2014 12:44:34 -0500 Message-ID: <19734.1417628674@sss.pgh.pa.us> 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 Flavio Henrique Araque Gurgel writes: > Hello all > In the documentation in: > http://www.postgresql.org/docs/current/static/sql-altertable.html > It says that, to rename a constraint, we can use: > ALTER TABLE [ IF EXISTS ] [ ONLY ] name [ * ] > RENAME CONSTRAINT constraint_name TO new_constraint_name > Who is wrong, parser or documentation (or myself)? Documentation, evidently: a look at the grammar shows that IF EXISTS has been implemented only for a rather haphazard subset of ALTER ... RENAME cases, and this isn't one of them. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs