X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1C65952E7D for ; Tue, 26 Jul 2005 07:18:55 -0300 (ADT) 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 63222-10 for ; Tue, 26 Jul 2005 10:18:50 +0000 (GMT) Received: from smtp-out.completel.net (smtp-out.completel.net [83.145.110.36]) by svr1.postgresql.org (Postfix) with ESMTP id 2452252E44 for ; Tue, 26 Jul 2005 07:18:49 -0300 (ADT) Received: from mail.emicnetworks.com (unknown [213.244.29.170]) by smtp-out.completel.net (Postfix) with SMTP id B0AA8280028 for ; Tue, 26 Jul 2005 12:18:49 +0200 (CEST) Received: (nullmailer pid 1470 invoked by uid 1000); Tue, 26 Jul 2005 10:20:09 -0000 Date: Tue, 26 Jul 2005 12:20:09 +0200 From: Marc Herbert To: pgsql-jdbc@postgresql.org Subject: Re: getObject() returns integer instead of LargeObject Message-ID: <20050726102009.GB17905@emicnetworks.com> References: <20050722135640.GM7394@emicnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040907i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.044 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200507/317 X-Sequence-Number: 13465 On Fri, Jul 22, 2005 at 01:41:19PM -0500, Kris Jurka wrote: > > > On Fri, 22 Jul 2005, Marc Herbert wrote: > > > Is there some good reason for getObject() to return the > > bare oid integer instead of the actual LargeObject handle ? > > This makes the assumption that the only use of oids is for large objects. > What if someone wrote SELECT oid,relname FROM pg_class? Thanks for answering. What would you recommend to unambiguously identify a Blob column in a arbitrary ResultSet, using only JDBC? For instance could you trust Types.BLOB == rs.getMetaData.getColumnType() in every case? Is there any other way? Would it depend on the latest version of the driver/database? Thanks in advance for you help! PS: why do LOBs seem to use regular oids instead of some other less ambiguous say, "loid" ?