Re: ALTER TABLE documentation or parser bug

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Flavio Henrique Araque Gurgel <fhagur(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org, osalm(at)mirakl(dot)com
Subject: Re: ALTER TABLE documentation or parser bug
Date: 2014-12-03 17:44:34
Message-ID: 19734.1417628674@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Flavio Henrique Araque Gurgel <fhagur(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message rseshadr 2014-12-03 23:31:44 BUG #12129: questions on exporting data from a database
Previous Message Flavio Henrique Araque Gurgel 2014-12-03 17:19:42 ALTER TABLE documentation or parser bug