Re: Constraint->function dependency and dump in 7.3

From: SZŰCS Gábor <surrano(at)mailbox(dot)hu>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Constraint->function dependency and dump in 7.3
Date: 2004-07-13 18:20:24
Message-ID: 024801c46906$10d87d00$0403a8c0@fejleszt4
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Dear Rod,

That sounds as good as simple ;) As for as patching, we do something like
that. Developed a PHP script that compares schema files (not dumps, but
source codes instead) to the actual. Say, it creates a temp table and
compares it to the existing one, examining pg_attributes, pg_indexes,
pg_constraints etc. then runs appropriate ALTER TABLE commands on the old
table. Creating a clean double of the prod and keeping its schema sounds
good to handle exceptional things.

Yours,
G.
%----------------------- cut here -----------------------%
\end

----- Original Message -----
From: "Rod Taylor" <pg(at)rbt(dot)ca>
Sent: Tuesday, July 13, 2004 8:03 PM

> When building a new box to duplicate production:
> 1. Apply all patches in order
> for i in `ls *.sql` ; do cat $i | psql test_db ; done
> 2. Do a data dump of production and restore that to the testing area
> pg_dump --data-only prod_db | psql test_db
>
> Now you don't need to worry about whether the production schema will or
> will not dump properly, since you can reproduce that using external
> files.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Vic Ricker 2004-07-13 20:29:41 How do I convice postgres to use an index?
Previous Message Rod Taylor 2004-07-13 18:03:37 Re: Constraint->function dependency and dump in 7.3