Re: [PATCH] 8.5 TODO: Add comments to output indicating version of pg_dump and of the database server - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] 8.5 TODO: Add comments to output indicating version of pg_dump and of the database server
Date
Msg-id 16950.1266963164@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] 8.5 TODO: Add comments to output indicating version of pg_dump and of the database server  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [PATCH] 8.5 TODO: Add comments to output indicating version of pg_dump and of the database server
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Feb 23, 2010 at 1:47 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> However, has the patch actually been reviewed? �pg_dump is a piece of
>> code where it is notoriously easy for novices to do things wrong,
>> and this is especially true for adding output that should only come out
>> in particular cases.

> It's a fairly trivial patch.  I took a quick look at it.  It needs
> more than that, but I think not too much more.  I think it would be
> less effort for someone to review it and make a decision than it would
> be to keep it as an open item for the next 6 months.  But that's just
> MHO: if the consensus is to postpone it, then let's just do that and
> move on.

Well, "trivial" and "correct" are entirely different things :-(.
If we're still talking about
http://archives.postgresql.org/message-id/c2ee6dbd0909270432hd7773edk144080185fb5259d@mail.gmail.com
then it is in fact printing the wrong thing for pg_dump's version.
PG_VERSION is a compiled-in constant so what you will get when examining
an archive is pg_restore's version not pg_dump's version.  This is
no doubt fixable but it looks like the code doesn't currently bother
to set archiveDumpVersion in the plain pg_dump code path, so it's
not entirely trivial.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: phypot - Pygmy Hippotause ?
Next
From: Rémi Zara
Date:
Subject: Pika buildfarm member failure on pgcrypto/test sha2