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

From Bruce Momjian
Subject Re: ALTER TABLE documentation or parser bug
Date
Msg-id 20150321015254.GC13192@momjian.us
Whole thread Raw
In response to Re: ALTER TABLE documentation or parser bug  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: ALTER TABLE documentation or parser bug  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-bugs
On Wed, Dec  3, 2014 at 12:44:34PM -0500, Tom Lane wrote:
> 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.

Rather than fixing the docs, I implemented the feature --- patch
attached.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +

Attachment

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: BUG #12108: Documentation: Limitation of shell types not mentioned
Next
From: Michael Paquier
Date:
Subject: Re: Problem when installing PL/Proxy with Windows OS