Re: BUG #8176: problem with the "ALTER TYPE name RENAME TO new_name [ CASCADE | RESTRICT ]" syntax

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: maxim(dot)boguk(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #8176: problem with the "ALTER TYPE name RENAME TO new_name [ CASCADE | RESTRICT ]" syntax
Date: 2013-05-27 14:23:52
Message-ID: 20130527142352.GT8597@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Maxim,

* Stephen Frost (sfrost(at)snowman(dot)net) wrote:
> * maxim(dot)boguk(at)gmail(dot)com (maxim(dot)boguk(at)gmail(dot)com) wrote:
> > It seems that documentation wrong or [ CASCADE | RESTRICT ] feature of ALTER
> > TYPE ... RENAME TO isn't implemented.
>
> Actually, I'm pretty sure it's implemented but the grammar for it was
> broken during refactoring to have all the ALTER .. RENAME operations go
> through the same code paths.

Nope, I was wrong- this looks to be a documentation bug, actually. The
documentation should be:

ALTER TYPE name RENAME ATTRIBUTE attribute_name TO new_attribute_name [ CASCADE | RESTRICT ]
ALTER TYPE name RENAME TO new_name

Which makes more sense (to me at least) anyway. Do you have a need for
this version:

ALTER TYPE name RENAME TO new_name [ CASCADE | RESTRICT ]

or were you just playing with things..?

Thanks,

Stephen

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephen Frost 2013-05-27 14:25:09 Re: BUG #8176: problem with the "ALTER TYPE name RENAME TO new_name [ CASCADE | RESTRICT ]" syntax
Previous Message Tom Lane 2013-05-27 14:21:15 Re: BUG #8176: problem with the "ALTER TYPE name RENAME TO new_name [ CASCADE | RESTRICT ]" syntax