When the driver asks the server to resolve a type the resolved type is stored in the SimpleQuery object.  When the statement is executed again the driver determines whether the existing types match or if it needs to be reprepared by comparing the current Statement's settings with the SimpleQuery.  The Statement will have the unspecified oid while the SimpleQuery will have the resolved oid, so there will not be a match and the statement will needlessly be reprepared.  Allow an unspecified oid to match any resolved type.
When the driver asks the server to resolve a type the resolved type
is stored in the SimpleQuery object.  When the statement is executed
again the driver determines whether the existing types match or if
it needs to be reprepared by comparing the current Statement's
settings with the SimpleQuery.  The Statement will have the
unspecified oid while the SimpleQuery will have the resolved oid, so
there will not be a match and the statement will needlessly be
reprepared.  Allow an unspecified oid to match any resolved type.

Reported by Akira Sato.

tivv/davepgjdbc,tivv/davepgjdbc