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 6AC329DCBE4 for ; Wed, 8 Feb 2006 14:14:28 -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 06980-02 for ; Wed, 8 Feb 2006 14:14:27 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 2AF5E9DCBC3 for ; Wed, 8 Feb 2006 14:14:26 -0400 (AST) Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by svr4.postgresql.org (Postfix) with SMTP id 168AE5AF048 for ; Wed, 8 Feb 2006 18:11:49 +0000 (GMT) Received: (qmail 15021 invoked by uid 1112); 8 Feb 2006 18:11:38 -0000 Date: Wed, 8 Feb 2006 13:11:38 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Mark Lewis Cc: Ryan Li , pgsql-jdbc@postgresql.org Subject: Re: oid as long type In-Reply-To: <1139420461.11375.40.camel@archimedes> Message-ID: References: <20060208094744.74887.qmail@web34701.mail.mud.yahoo.com> <1139420461.11375.40.camel@archimedes> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.092 required=5 tests=[AWL=0.092] X-Spam-Score: 0.092 X-Spam-Level: X-Archive-Number: 200602/59 X-Sequence-Number: 14656 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