On Nov 17, 2010, at 12:42 PM, Richard Broersma wrote:
> ALTER TABLE foo
> DROP CONSTRAINT your_constraint,
> ADD CONSTRAINT your_constraint FOREIGN KEY ...
> ON UPDATE CASCADE ON DELETE RESTRICT;
Thanks. That worked.
-Aram
--
Sent via pgsql-general mailing list (pgsql-general@pos
Richard Broersma wrote:
> On Wed, Nov 17, 2010 at 8:43 AM, David Fetter wrote:
>
> > You can do it like this:
> >
> > BEGIN;
> > ALTER TABLE foo DROP CONSTRAINT your_constraint;
> > ALTER TABLE foo ADD FOREIGN KEY ...;
> > COMMIT;
>
> The nice thing about the ALTER TABLE statement is that you
On Wed, Nov 17, 2010 at 8:43 AM, David Fetter wrote:
> You can do it like this:
>
> BEGIN;
> ALTER TABLE foo DROP CONSTRAINT your_constraint;
> ALTER TABLE foo ADD FOREIGN KEY ...;
> COMMIT;
The nice thing about the ALTER TABLE statement is that you can do it
in one command:
ALTER TABLE foo
DR
On Wed, Nov 17, 2010 at 11:32:32AM -0500, Aram Fingal wrote:
> I have a table where I should have declared a foreign key with ON
> UPDATE CASCADE and didn't. Now I want to fix that. From the
> documentation on www.postgresql.org, about ALTER TABLE it's not at
> all clear how to do this or even wh
On 11/17/2010 08:32 AM, Aram Fingal wrote:
I have a table where I should have declared a foreign key with ON UPDATE
CASCADE and didn't. Now I want to fix that. From the documentation on
www.postgresql.org, about ALTER TABLE it's not at all clear how to do this or
even whether you can do this
I have a table where I should have declared a foreign key with ON UPDATE
CASCADE and didn't. Now I want to fix that. From the documentation on
www.postgresql.org, about ALTER TABLE it's not at all clear how to do this or
even whether you can do this.
-Aram
--
Sent via pgsql-general mailing