Skip site navigation (1) Skip section navigation (2)

Re: Comparing two PostgreSQL databases -- order of pg_dump output

From: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
To: Joe Abbate <jma(at)freedomcircle(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Comparing two PostgreSQL databases -- order of pg_dump output
Date: 2011-08-30 21:33:55
Message-ID: CAJKUy5jxJzwAGvW+5bQtjF8PSuE35X69NfTUMotZU8xs2NxV_w@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Tue, Aug 30, 2011 at 3:14 PM, Joe Abbate <jma(at)freedomcircle(dot)com> wrote:
> Hola Jaime,
>
> On 08/30/2011 03:24 PM, Jaime Casanova wrote:
>>
>> what about using pg_dump -Fc -Osx and use pg_restore -l to list
>> objects. then you can sort and compare objects and then a script that
>> compare schema of objects extracting them with -P, -T or -t
>
> That appears to be of limited use (i.e., it would only work for functions,
> triggers and tables).  pg_restore -L/--use_list is more comprehensive.
> So the script would have to do something like the following:
>
> $ pg_dump -Fc -Osx postgis > postgis.dump
> $ pg_restore -l postgis.dump | sort -k4  > postgis.list

why not "sort -k4,5"?

-- 
Jaime Casanova         www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación

In response to

Responses

pgsql-hackers by date

Next:From: Joe AbbateDate: 2011-08-30 22:04:22
Subject: Re: Comparing two PostgreSQL databases -- order of pg_dump output
Previous:From: Robert HaasDate: 2011-08-30 20:53:30
Subject: Re: spinlocks on HP-UX

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group