X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DC1D3DBB30 for ; Fri, 18 Nov 2005 19:50:55 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 07371-07 for ; Fri, 18 Nov 2005 23:50:57 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by svr1.postgresql.org (Postfix) with SMTP id D76ABDBB2D for ; Fri, 18 Nov 2005 19:50:52 -0400 (AST) Received: (qmail 23849 invoked from network); 18 Nov 2005 23:53:43 -0000 Received: from unknown (HELO ?127.0.0.1?) (63.111.27.212) by mail63.csoft.net with SMTP; 18 Nov 2005 23:53:43 -0000 Message-ID: <437E68DC.6070107@ejurka.com> Date: Fri, 18 Nov 2005 15:50:52 -0800 From: Kris Jurka User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.11) Gecko/20050914 Debian/1.7.11-1 X-Accept-Language: en MIME-Version: 1.0 To: Kevin Grittner CC: pgsql-jdbc@postgresql.org Subject: Re: ResultSet.getObject returning PGobject References: <437E0F7E0200002500000883@gwmta.wicourts.gov> In-Reply-To: <437E0F7E0200002500000883@gwmta.wicourts.gov> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/120 X-Sequence-Number: 14218 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