X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 6F8669DC828 for ; Wed, 8 Feb 2006 21:37:57 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 03533-08 for ; Wed, 8 Feb 2006 21:38:01 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 506429DC816 for ; Wed, 8 Feb 2006 21:37:55 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k191bse6022327; Wed, 8 Feb 2006 20:37:54 -0500 (EST) To: Kris Jurka cc: Mark Lewis , Ryan Li , pgsql-jdbc@postgresql.org Subject: Re: oid as long type In-reply-to: References: <20060208094744.74887.qmail@web34701.mail.mud.yahoo.com> <1139420461.11375.40.camel@archimedes> <21986.1139448093@sss.pgh.pa.us> Comments: In-reply-to Kris Jurka message dated "Wed, 08 Feb 2006 20:34:43 -0500" Date: Wed, 08 Feb 2006 20:37:54 -0500 Message-ID: <22326.1139449074@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.108 required=5 tests=[AWL=0.108] X-Spam-Score: 0.108 X-Spam-Level: X-Archive-Number: 200602/64 X-Sequence-Number: 14661 Kris Jurka writes: > ... 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. Right, but at least on the select side you do know the datatype and so you can do it (in principle anyway, not sure what it would actually take in the JDBC code). The hard part would be on the data transmission side ... but AFAICS you can just play dumb and send the negative integer value as an integer parameter, letting the database coerce it to OID if needed. regards, tom lane