Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 7C2C3634693 for ; Thu, 26 Mar 2009 12:44:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 60588-03 for ; Thu, 26 Mar 2009 12:43:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id B8642633DFB for ; Thu, 26 Mar 2009 12:43:51 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id n2QFhGvM022435; Thu, 26 Mar 2009 11:43:16 -0400 (EDT) To: "Sabin Coanda" cc: pgsql-admin@postgresql.org Subject: Re: plain text difference with pg_dump In-reply-to: References: Comments: In-reply-to "Sabin Coanda" message dated "Thu, 26 Mar 2009 16:53:55 +0200" Date: Thu, 26 Mar 2009 11:43:16 -0400 Message-ID: <22434.1238082196@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.013 tagged_above=0 required=5 tests=AWL=0.013 X-Spam-Level: X-Archive-Number: 200903/232 X-Sequence-Number: 31732 "Sabin Coanda" 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