From: Tom Lane <tgl@sss.pgh.pa.us>
To: Sabin Coanda <sabin.coanda@deuromedia.ro>
Cc: pgsql-admin@postgresql.org
Subject: Re: plain text difference with pg_dump
Date: Thu, 26 Mar 2009 11:43:16 -0400
Message-ID: <22434.1238082196@sss.pgh.pa.us> (raw)
In-Reply-To: <gqg4vc$3ut$1@news.hub.org>
References: <gqg4vc$3ut$1@news.hub.org>
"Sabin Coanda" <sabin.coanda@deuromedia.ro> writes:
> The problem is when I check the structure difference between DD and DP. My
> procedure is to use pg_dump to make a plain text dump of the two databases,
> and compare them, ignoring the comments. All the procedures are sorted
> identically, excepting those with the same name, but different arguments.
> Do you know a method to get the same text dump ?
Yeah, this has been complained about before. The problem is that
pg_dump's DOTypeNameCompare() function sorts only by object name,
and if the names are the same then by object OID (which typically
boils down to being the creation order). Ideally we should get it
to consider more data, such as the argument lists for similarly-named
functions, before falling back on OID order.
If you're not up to hacking a fix for that, you could try dropping
the functions and re-creating them in the same order on both machines,
so that the OID sort produces similar results.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, sabin.coanda@deuromedia.ro
Subject: Re: plain text difference with pg_dump
In-Reply-To: <22434.1238082196@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox