Skip site navigation (1) Skip section navigation (2)

Re: [PATCH] Datatype of OID should be VARBINARY, not INT

From: Nissim <nissim(at)nksystems(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [PATCH] Datatype of OID should be VARBINARY, not INT
Date: 2000-06-16 17:56:38
Message-ID: 394A6A56.ADFC63A2@nksystems.com (view raw or flat)
Thread:
Lists: pgsql-interfaces
Tom Lane wrote:
> 
> Nissim <nissim(at)nksystems(dot)com> 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

In response to

Responses

pgsql-interfaces by date

Next:From: Tom LaneDate: 2000-06-16 18:23:37
Subject: Re: [PATCH] Datatype of OID should be VARBINARY, not INT
Previous:From: ukritcfDate: 2000-06-16 16:48:41
Subject:

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group