Kevin Grittner <kgrittn@ymail.com> writes:
> Oh, I just noticed that this is for the *pg_restore* code, not the
> pg_dump code, so there isn't necessarily a conflict with the docs.
> The pg_dump code does match the docs on its version check. The
> question becomes, for each supported version, what do we want to
> set into AHX->minRemoteVersion before opening the connection to the
> target database?� Do we really want a 9.4 executable to be
> attempting to restore to a 7.1 database cluster?� What about
> backpatching?
On reflection, I'm not sure that pg_restore as such should be applying any
server version check at all. pg_restore itself has precious little to do
with whether there will be a compatibility problem; that's mostly down to
the DDL that pg_dump put into the archive file. And we don't have enough
information to be very sure about whether it will work, short of actually
trying it. So why should the code arbitrarily refuse to try?
So I'm inclined to propose that we set min/max to 0 and 999999 here.
regards, tom lane