Received: from mail1.panix.com (mail1.panix.com [166.84.0.212]) by hub.org (8.10.1/8.10.1) with ESMTP id e5GI1wN25133 for ; Fri, 16 Jun 2000 14:01:58 -0400 (EDT) Received: from nksystems.com (remote-nksystems-gw.nyc.dsl.access.net [166.84.151.226]) by mail1.panix.com (Postfix) with ESMTP id 104313122C; Fri, 16 Jun 2000 14:01:48 -0400 (EDT) Message-ID: <394A6A56.ADFC63A2@nksystems.com> Date: Fri, 16 Jun 2000 13:56:38 -0400 From: Nissim X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.13-4mdk i686) X-Accept-Language: en MIME-Version: 1.0 To: Tom Lane Cc: pgsql-interfaces@postgresql.org Subject: Re: [PATCH] Datatype of OID should be VARBINARY, not INT References: <394A3D07.C1542D05@nksystems.com> <7249.961167897@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200006/73 Tom Lane wrote: > > Nissim writes: > > The datatype returned by the ResultSetMetaData for OID should be > > VARBINARY, not INT. > > Uh, why? There's nothing VAR about it that I can see, and it is > the same size as INT ... at the moment anyway ... > > regards, tom lane If you're using it to identify rows then it is used like an int, but if you're using it to point to a Large Object, the LO is variable size binary data, right? We're using it with village: http://www.working-dogs.com/village which decides which set method of the PreparedStatement to use, based on the type in the MetaData. If the type returned is INTEGER then it does setInt, and if the type is BINARY or VARBINARY it does setBytes. Do you have a better solution than making the change I sent in the patch? Will returning VARBINARY as the type of an OID column break anyone elses apps? -Nissim