Regenerating references - Mailing list pgsql-general

From SZŰCS Gábor
Subject Regenerating references
Date
Msg-id 006f01c29626$8d4d6b20$0a03a8c0@fejleszt2
Whole thread Raw
List pgsql-general
Hi there,

As always, feel free to show me to the archives if this question is already
answered.

We seek the simplest way to regenerate references on a
dropped-and-regenerated table.

1. Drop all referencing tables. This may cause recursion so we don't like
the idea.

2. Find out all the references to the table before dropping it, then create
the RI triggers as found in the output of pg_dump, for all the referencing
tables and the dropped table.
   I'm not sure if it's enough, but I think we can generate the appropriate
trigger commands. Is there a clearly separable algorithm to do this, say, a
function in pg_dump's source?

3. Any other ideas?

Thanks in advance,
G.
--
while (!asleep()) sheep++;

---------------------------- cut here ------------------------------


pgsql-general by date:

Previous
From: Jean-Christian Imbeault
Date:
Subject: Re: Create Timestamp From Date and Time
Next
From: Jean-Christian Imbeault
Date:
Subject: Re: 7.3RC1 ?? Re: PostgreSQL compilation with custom table