Thread: rename constraint

rename constraint

From
"sathiya psql"
Date:
Hi,

I need to change the name of the constraint.,

What will be the best way to do this.

Am using postgres 8.1.

Is it possible to do the rename constraint( like renaming a column), i don't know how to do this ?

Or i need to drop the constraint, and i need to create constraint with new name, how the impact of this in performance, because these constraint changes am going to do in a table which has 10 million records....

Re: rename constraint

From
Thomas Spreng
Date:
On 17.04.2008, at 14:03, sathiya psql wrote:
> Hi,
>
> I need to change the name of the constraint.,
>
> Or i need to drop the constraint, and i need to create constraint
> with new
> name, how the impact of this in performance, because these constraint
> changes am going to do in a table which has 10 million records....

That's how I would do it, create the new constriaint, then drop the
old one.
I'n not aware of any syntax that would allow to rename a constraint.

Cheers,

tom