Re: Modifying a foreign key constraint?

From: Marc Branchaud <marcnarc(at)x2omedia(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Modifying a foreign key constraint?
Date: 2007-02-09 18:20:09
Message-ID: 45CCBB59.8070005@x2omedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Richard Broersma Jr wrote:
>
> Sure there is, you can preform multiple alterations in one statement:
>
> ALTER TABLE foo DROP CONSTRAINT foo_bar_id_fkey,
> ADD CONSTRAINT foo_bar_id_fkey
> FOREIGN KEY (bar_fkey)
> REFERENCES bar (id)
> ON DELETE CASCADE;

Doh! That's perfectly fine, of course.

I was wondering if there might be something along the lines of an ALTER
CONSTRAINT clause, which could change a specific aspect of a constraint
without having to re-specify the whole thing.

Marc

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Broersma Jr 2007-02-09 18:33:19 Re: Modifying a foreign key constraint?
Previous Message Merlin Moncure 2007-02-09 18:19:18 Re: Postgres SQL Syntax