Deleting foreign key constraints
Deleting foreign key constraints
От:
"Nikhil G. Daddikar" <ngd@celoxis.com>
Дата:
Hello, Is there a way to delete all foreign key constraints for a table? Also, is there a way to programmatically find all tables (excluding system created) in a database? I am using 7.1.3 Thanks much.
Re: Deleting foreign key constraints
От:
Christoph Dalitz <christoph.dalitz@hs-niederrhein.de>
Дата:
On Thu, 29 Aug 2002 05:44:14 -0400 pgsql-general-owner@postgresql.org wrote: > > Is there a way to delete all foreign key constraints for a table? > "ALTER
Re: Deleting foreign key constraints
От:
Stephan Szabo <sszabo@megazone23.bigpanda.com>
Дата:
On Thu, 29 Aug 2002, Nikhil G. Daddikar wrote: > Is there a way to delete all foreign key constraints for a table? Not a particularly good one. You'll probably need to drop the triggers manually (from both that table and the table it references) and you'll need to match up the arguments to do that. There's some info on techdocs.postgresql.org about the triggers that you might find useful. > Also, is there a way to programmatically find all tables (excluding > system created) in a database? Check the query generated by psql for a \d (use psql -E to get the the query). It'll be something with pg_class. > > I am using 7.1.3