Обсуждение: Incremental Dump

Поиск
Список
Период
Сортировка

Incremental Dump

От
"Herbie McDuck"
Дата:
Is there a proceedure to allow one to compare the database structure of a
deployed database against a developmenmt database to note any structural
change in one or more tables?

--Herbie McDuck


Re: Incremental Dump

От
Tom Lane
Дата:
"Herbie McDuck" <herbie@faams.net> writes:
> Is there a proceedure to allow one to compare the database structure of a
> deployed database against a developmenmt database to note any structural
> change in one or more tables?

I'd try pg_dump -s (schema only) and diff the two dumps.  You might have
to do some fooling around if objects were created in different orders in
the two databases, though, since that would affect the dump order.

            regards, tom lane

Re: Incremental Dump

От
"Herbie McDuck"
Дата:
Well Tom, the two databases are production and development. The table create
sequence should be the same.

Thanks for the insight !!

Herbie McDuck

----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Herbie McDuck" <herbie@faams.net>
Cc: <pgsql-novice@postgresql.org>
Sent: Thursday, June 26, 2003 6:52 AM
Subject: Re: [NOVICE] Incremental Dump


> "Herbie McDuck" <herbie@faams.net> writes:
> > Is there a proceedure to allow one to compare the database structure of
a
> > deployed database against a developmenmt database to note any structural
> > change in one or more tables?
>
> I'd try pg_dump -s (schema only) and diff the two dumps.  You might have
> to do some fooling around if objects were created in different orders in
> the two databases, though, since that would affect the dump order.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match


Re: Incremental Dump

От
Nabil Sayegh
Дата:
Am Don, 2003-06-26 um 15.52 schrieb Tom Lane:

> I'd try pg_dump -s (schema only) and diff the two dumps.  You might have
> to do some fooling around if objects were created in different orders in
> the two databases, though, since that would affect the dump order.

I'd also remove all comments:

pg_dump -s dbname |egrep -v "^\-\-"

HTH
--
 e-Trolley Sayegh & John, Nabil Sayegh
 Tel.: 0700 etrolley /// 0700 38765539
 Fax.: +49 69 8299381-8
 PGP : http://www.e-trolley.de