pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ryan Li <rleeuk@yahoo.com>
To: pgsql-jdbc@postgresql.org
Subject: oid as long type
Date: Wed, 8 Feb 2006 01:47:44 -0800 (PST)
Message-ID: <20060208094744.74887.qmail@web34701.mail.mud.yahoo.com> (raw)

What's the reason of using int rather than long for the large object oid? I am experiencing a problem where the database server is generating oids exceeding the size for a Java int, and got "org.postgresql.util.PSQLException: Bad value for type int". Could this be solve by making org.postgresql.largeobject.LargeObject.oid a long type and make corresponding changes to the source tree?

(for example in org.postgresql.jdbc3.Jdbc3ResultSet.getBlob(int), instead of:

 return new Jdbc3Blob(connection, getInt(i));

do:

return new Jdbc3Blob(connection, getLong(i));)

I am not familar with the internals of the driver, so not sure if there are other complications. Any advice on using long oids would be much appreciated.

Thanks in advance!

Ryan





view thread (10+ messages)  latest in thread

Message-ID: <20060208094744.74887.qmail@web34701.mail.mud.yahoo.com>
Permalink:  ../20060208094744.74887.qmail@web34701.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/20060208094744.74887.qmail@web34701.mail.mud.yahoo.com

 · 

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: rleeuk@yahoo.com
  Subject: Re: oid as long type
  In-Reply-To: <20060208094744.74887.qmail@web34701.mail.mud.yahoo.com>
  References: <20060208094744.74887.qmail@web34701.mail.mud.yahoo.com>

* 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