Re: ALTER TABLE documentation or parser bug - Mailing list pgsql-bugs

From Tom Lane
Subject Re: ALTER TABLE documentation or parser bug
Date
Msg-id 19734.1417628674@sss.pgh.pa.us
Whole thread Raw
In response to ALTER TABLE documentation or parser bug  (Flavio Henrique Araque Gurgel <fhagur@gmail.com>)
Responses Re: ALTER TABLE documentation or parser bug
List pgsql-bugs
Flavio Henrique Araque Gurgel <fhagur@gmail.com> 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

pgsql-bugs by date:

Previous
From: Flavio Henrique Araque Gurgel
Date:
Subject: ALTER TABLE documentation or parser bug
Next
From: Heikki Linnakangas
Date:
Subject: Re: BUG #11949: pg_basebackup creates defective tar file