Re: oid as long type - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: oid as long type
Date
Msg-id 22326.1139449074@sss.pgh.pa.us
Whole thread Raw
In response to Re: oid as long type  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
Kris Jurka <books@ejurka.com> writes:
> ... There is still an issue on the select side, yes
> there is a possible conversion from oid::int4, but no one is going to
> write their query with that oidcolumn::int4 cast so the driver will have
> to selectively remap larger than int values to negative for OIDs, but
> not for other types.

Right, but at least on the select side you do know the datatype and so
you can do it (in principle anyway, not sure what it would actually take
in the JDBC code).  The hard part would be on the data transmission
side ... but AFAICS you can just play dumb and send the negative integer
value as an integer parameter, letting the database coerce it to OID if
needed.

            regards, tom lane

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: oid as long type
Next
From: "Xavier Bugaud"
Date:
Subject: Full XA availability ?