Regenerating references

From: SZŰCS Gábor <surrano(at)mailbox(dot)hu>
To: <pgsql-general(at)postgresql(dot)org>
Cc: <TIR(at)yahoogroups(dot)com>
Subject: Regenerating references
Date: 2002-11-27 15:06:18
Message-ID: 006f01c29626$8d4d6b20$0a03a8c0@fejleszt2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 ------------------------------

Browse pgsql-general by date

  From Date Subject
Next Message Jean-Christian Imbeault 2002-11-27 15:06:21 Re: 7.3RC1 ?? Re: PostgreSQL compilation with custom table
Previous Message Jean-Christian Imbeault 2002-11-27 14:38:28 Re: Create Timestamp From Date and Time