From: Kris Jurka <books@ejurka.com>
To: 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, 8 Feb 2006 13:11:38 -0500 (EST)
Message-ID: <Pine.BSO.4.61.0602081300560.13208@leary.csoft.net> (raw)
In-Reply-To: <1139420461.11375.40.camel@archimedes>
References: <20060208094744.74887.qmail@web34701.mail.mud.yahoo.com>
<Pine.BSO.4.61.0602081158340.24353@leary.csoft.net>
<1139420461.11375.40.camel@archimedes>
On Wed, 8 Feb 2006, Mark Lewis wrote:
> To maintain compatibility with existing code but still give access to
> the entire OID value space, why not map OID values >= 2**31 to negative
> numbers-- i.e. just consider them to be signed ints?
We don't always know when we're working with OIDs. If someone says
PreparedStatement.setInt() we don't know if they're passing us a mangled
OID they got from LargeObjectManager.create or if they're just passing us
an int, so we'd have to send the mangled form to the database. This will
break any triggers that are added to delete large objects on row deletion
and will completely break any non-JDBC clients that access the database.
You'd also have to adjust all of your ResultSet.getInt() calls to
determine if you're dealing with an OID and then check if it's a mangled
OID or not. Doesn't sound like a great idea to me.
Kris Jurka
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: books@ejurka.com, mark.lewis@mir3.com, rleeuk@yahoo.com
Subject: Re: oid as long type
In-Reply-To: <Pine.BSO.4.61.0602081300560.13208@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>
* 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