pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kris Jurka <books@ejurka.com>
Cc: Mark Lewis <mark.lewis@mir3.com>
Cc: Ryan Li <rleeuk@yahoo.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: oid as long type
Date: Wed, 08 Feb 2006 20:37:54 -0500
Message-ID: <22326.1139449074@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.BSO.4.61.0602082026390.23843@leary.csoft.net>
References: <20060208094744.74887.qmail@web34701.mail.mud.yahoo.com>
	<Pine.BSO.4.61.0602081158340.24353@leary.csoft.net>
	<1139420461.11375.40.camel@archimedes>
	<Pine.BSO.4.61.0602081300560.13208@leary.csoft.net>
	<21986.1139448093@sss.pgh.pa.us>
	<Pine.BSO.4.61.0602082026390.23843@leary.csoft.net>

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



view thread (10+ messages)

Message-ID: <22326.1139449074@sss.pgh.pa.us>
Permalink:  ../22326.1139449074@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22326.1139449074@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: tgl@sss.pgh.pa.us, books@ejurka.com, mark.lewis@mir3.com, rleeuk@yahoo.com
  Subject: Re: oid as long type
  In-Reply-To: <22326.1139449074@sss.pgh.pa.us>
  References: <20060208094744.74887.qmail@web34701.mail.mud.yahoo.com> <Pine.BSO.4.61.0602081158340.24353@leary.csoft.net> <1139420461.11375.40.camel@archimedes> <Pine.BSO.4.61.0602081300560.13208@leary.csoft.net> <21986.1139448093@sss.pgh.pa.us> <Pine.BSO.4.61.0602082026390.23843@leary.csoft.net> <22326.1139449074@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox