pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Cascade constraint gone!!! 2+ messages / 2 participants [nested] [flat]
* Cascade constraint gone!!! @ 2001-06-06 16:34 Linh Luong <linh.luong@computalog.com> 0 siblings, 1 reply; 2+ messages in thread From: Linh Luong @ 2001-06-06 16:34 UTC (permalink / raw) To: pgsql-sql Hi, I recently wipe my database away. And some of the tables have a UPDATE CASCADE on it to another table. When I reload the data from my backup that I did with pg_dumpall. My code started to give me an error because I tried to modify a table that was reference from another table. But the referenced table should have an UPDATE CASCADE. But according to the error it doesn't. Is there a way to add the ON UPDATE CASCADE back without dropping any table again? Thanks -- Linh Luong ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Cascade constraint gone!!! @ 2001-06-06 17:27 Stephan Szabo <sszabo@megazone23.bigpanda.com> parent: Linh Luong <linh.luong@computalog.com> 0 siblings, 0 replies; 2+ messages in thread From: Stephan Szabo @ 2001-06-06 17:27 UTC (permalink / raw) To: Linh Luong <linh.luong@computalog.com>; +Cc: pgsql-sql On Wed, 6 Jun 2001, Linh Luong wrote: > I recently wipe my database away. And some of the tables have a UPDATE > CASCADE on it to another table. > When I reload the data from my backup that I did with pg_dumpall. My > code started to give me an error because I tried to modify a table that > was reference from another table. But the referenced table should have > an UPDATE CASCADE. But according to the error it doesn't. Hmm, what does the create constraint triggers in the dump say? And what is in pg_trigger for the constraint? > Is there a way to add the ON UPDATE CASCADE back without dropping any > table again? Well, you can manually delete the constraint triggers for this constraint and use alter table add constraint to add the constraint again with the appropriate actions. ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2001-06-06 17:27 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2001-06-06 16:34 Cascade constraint gone!!! Linh Luong <linh.luong@computalog.com> 2001-06-06 17:27 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox