Re: 8.5devel: alter constraint ? - Mailing list pgsql-general

From Jeff Davis
Subject Re: 8.5devel: alter constraint ?
Date
Msg-id 1258229044.708.123.camel@jdavis
Whole thread Raw
In response to 8.5devel: alter constraint ?  (Andreas Kretschmer <akretschmer@spamfence.net>)
Responses Re: 8.5devel: alter constraint ?
List pgsql-general
On Sat, 2009-11-14 at 17:42 +0100, Andreas Kretschmer wrote:
> I'm playing with 8.5devel.
>
> My question: is it possible to alter a constraint without drop and
> rebuilding it?
>
> For instance, i have a table test with a primary key, but i have
> forgotten to declare the constraint as DEFERRABLE. I can drop and
> recreate that, but the index are also dropped and recreated and i think,
> this is not necessary.
>

Right now that is not possible.

While developing my operator exclusion constraints patch, I looked into
decoupling the constraint from the underlying index, which would make
this kind of thing possible (as well as some other cool stuff, like
multiple constraints using the same index). However, it requires work,
and user-visible syntax, and the use case is uncommon.

I may explore this further in the future.

Regards,
    Jeff Davis


pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: Remote Database Connection
Next
From: Greg Stark
Date:
Subject: Re: safelly erasing dirs/files