Re: Comparing tables in different db's

Поиск
Список
Период
Сортировка
От Darren Johnson
Тема Re: Comparing tables in different db's
Дата
Msg-id 20010810.13395600@j2.us.greatbridge.com
обсуждение исходный текст
Ответ на Comparing tables in different db's  (Phillip F Jansen <pfj@ucs.co.za>)
Список pgsql-hackers

>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

> I would like to know if there is a way to compare the data of tables in
> different databases. For example I have table in db1 and exactly the
> same table in db2. Is it possible to see if the contents of the two
> tables are exactly the same?

I use pg_dump for my tests.  Example

pg_dump -a -t table_name db1 > db1_dump.out
pg_dump -a -t table_name db2 > db2_dump.out

Then you can use diff db1_dump.out db2_dump.out

I hope this helps

Darren

> For example if the table(db1.customer) has a column surname and the
> field has a value of "Testing" and in db2.customer the exact same row
> has a value "Testong" is it possible to actually know that there is a
> difference ? I don't actually have to know what the actual differences
> are , I must just know that there is a difference.




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PL/pgSQL bug?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PL/pgSQL bug?