Re: 8.5devel: alter constraint ?

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: 8.5devel: alter constraint ?
Date: 2009-11-14 20:04:04
Message-ID: 1258229044.708.123.camel@jdavis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2009-11-14 20:12:11 Re: safelly erasing dirs/files
Previous Message John R Pierce 2009-11-14 19:55:02 Re: Remote Database Connection