Re: ALTER TABLE documentation or parser bug

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Flavio Henrique Araque Gurgel <fhagur(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org, osalm(at)mirakl(dot)com
Subject: Re: ALTER TABLE documentation or parser bug
Date: 2015-03-21 01:52:54
Message-ID: 20150321015254.GC13192@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Dec 3, 2014 at 12:44:34PM -0500, Tom Lane wrote:
> 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.

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

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

Attachment Content-Type Size
alter.diff text/x-diff 1.8 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2015-03-21 04:34:03 Re: Problem when installing PL/Proxy with Windows OS
Previous Message Bruce Momjian 2015-03-20 22:50:38 Re: BUG #12108: Documentation: Limitation of shell types not mentioned