Re: oid as long type

From: Kris Jurka <books(at)ejurka(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Mark Lewis <mark(dot)lewis(at)mir3(dot)com>, Ryan Li <rleeuk(at)yahoo(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: oid as long type
Date: 2006-02-09 01:34:43
Message-ID: Pine.BSO.4.61.0602082026390.23843@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Wed, 8 Feb 2006, Tom Lane wrote:

> Does that matter? There's an implicit cast from int4 to oid on the
> database side, so I am not clear where the problem really comes in.
>
> regression=# select (-1)::int4::oid;

I was not aware of that. 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. I'm still not excited about giving the user a
different representation of the value than is in the database, but now it
at least seems feasible.

Kris Jurka

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2006-02-09 01:37:54 Re: oid as long type
Previous Message Tom Lane 2006-02-09 01:21:33 Re: oid as long type