pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <jurka@ejurka.com>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: ResultSet.getObject returning PGobject
Date: Fri, 18 Nov 2005 15:50:52 -0800
Message-ID: <437E68DC.6070107@ejurka.com> (raw)
In-Reply-To: <437E0F7E0200002500000883@gwmta.wicourts.gov>
References: <437E0F7E0200002500000883@gwmta.wicourts.gov>

Kevin Grittner wrote:
> Ah, that may be a good clue.
> 
> We are not selecting any columns which are not directly mappable
> to a Java type -- at least not intentionally.  There is a problem with
> a JDBC escape sequence which is not implemented by PostgreSQL
> which is throwing some exceptions, which we are still cleaning up.
> Perhaps the syntax is occassionally being interpreted in some way
> which is causing this.  I'll suspend this issue until we get the other
> cleaned up and see if we still have this problem.

What escape sequence is that?  We could look at implementing it.

> This is happening on a SELECT where the result set consists entirely
> of simple references to columns from a single table.  The columns are
> all char, varchar, numeric, or int -- so they should all map to Java
> types.  It is happening on a small percentage of SELECTs with no
> apparent difference beyond the values used in otherwise identical
> WHERE clauses.
> 

I see no reason why the WHERE clause would alter the type of a result 
column.  Checking:

Object o = rs.getObject(col);
if (o instanceof PGobject) {
	System.err.println(((PGobject)o).getType());
	System.err.println(((PGobject)o).getValue());
}

or similar would tell you what the returned type was.

Kris Jurka




view thread (3+ messages)

Message-ID: <437E68DC.6070107@ejurka.com>
Permalink:  ../437E68DC.6070107@ejurka.com/
Also on:    postgresql.org/message-id/437E68DC.6070107@ejurka.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: jurka@ejurka.com, Kevin.Grittner@wicourts.gov
  Subject: Re: ResultSet.getObject returning PGobject
  In-Reply-To: <437E68DC.6070107@ejurka.com>
  References: <437E0F7E0200002500000883@gwmta.wicourts.gov> <437E68DC.6070107@ejurka.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