Re: can you change an FK constraint from NOT DEFERRABLE to DEFERRABLE

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: frank(at)joerdens(dot)de, pgsql-sql(at)postgresql(dot)org
Subject: Re: can you change an FK constraint from NOT DEFERRABLE to DEFERRABLE
Date: 2005-03-30 19:02:55
Message-ID: 20050330190255.GA19669@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, Mar 30, 2005 at 10:52:42 -0700,
Michael Fuhr <mike(at)fuhr(dot)org> wrote:
> On Wed, Mar 30, 2005 at 11:52:32AM -0600, Bruno Wolff III wrote:
> >
> > What version of Postgres are you running? I think ALTER CONSTRAINT is a
> > relatively recent addition.
>
> Where are you seeing ALTER CONSTRAINT? I don't see it in gram.y
> even in HEAD.

I guess only in the previous messages in the thread.
I remembered some recent additions to the ALTER TABLE command and incorrectly
assumed that ALTER CONSTRAINT was one of those.

It does look like you can only ADD and DROP constraints, not directly
alter or replace them. So making a reference deferable is go to require
a DROP and ADD which will need to recheck the constraint.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Joel Fradkin 2005-03-30 20:15:31 delphi access question?
Previous Message Michael Fuhr 2005-03-30 17:52:42 Re: can you change an FK constraint from NOT DEFERRABLE to DEFERRABLE