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