recreating table and foreign keys - Mailing list pgsql-sql

From Tomasz Myrta
Subject recreating table and foreign keys
Date
Msg-id 20021203170324.M63387@klaster.net
Whole thread Raw
Responses Re: recreating table and foreign keys  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-sql
Hi
I use Postgresql 7.2.2.
Sometimes I have to remove a column from my tables (psql):
1. alter table master_table rename to x;
2. \i tables.sql
3. insert into master_table select f1,f2,... from x
4. drop table x

I think, foreign keys referring from detail_table(s) to master_table 
have gone.
How to recreate foreign keys? I want to keep my database in better 
integrity, than now...

Tomasz Myrta






pgsql-sql by date:

Previous
From: "Berman, Phil"
Date:
Subject: Backend message type 0x50 arrived while idle
Next
From: "Troy"
Date:
Subject: Re: [OT] Inventory systems (private)