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

Re: [HACKERS] JDBC adaptor issue

From: Barry Lind <barry(at)xythos(dot)com>
To: Bruce Toback <btoback(at)mac(dot)com>
Cc: Barry Lind <blind(at)xythos(dot)com>, pgsql-hackers(at)postgresql(dot)org, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [HACKERS] JDBC adaptor issue
Date: 2001-06-25 06:08:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-jdbc
Actually the problem is worse than I thought.  Not only do all the 
get/setXXXStream methods assume the datatype is a BLOB, but also the 
get/setBytes methods.  This means that it isn't possible to support 
bytea as the binary datatype without also breaking some backward 

In looking at the CVS log, it appears that the stream methods were only 
introduced in the 7.1 JDBC driver, since 7.1 has only been out 
(production) a few months, the number of people affected will be 
smaller, the setBytes() method that assumed a blob was there in 7.0, so 
it is likely more people will be impacted by any change there.


Bruce Toback wrote:

> On Sunday, June 24, 2001, at 10:32 PM, Barry Lind wrote:
>> This is an interesting problem.  And I can't think a any easy 
>> solution.  But given TOAST in 7.1 the existing implementation doesn't 
>> make sense IMHO  My suggestion would be that the get/setXXXStream 
>> methods work on TOASTed data types and get/setBlob be used for Blobs.
> That would be my preference as well.
>> As far as your patch, I don't see that as a generic solution.  It is 
>> equally likely that a Blob could contain less than 8190 characters, or 
>> a varchar could contain more that 8190 characters in 7.1.
> It's certainly not a generic solution. I was looking for a solution that 
> would break fewer of the applications that rely on the current 
> nonstandard behavior. I'd much prefer to simply have get/ 
> just implement the standard behavior. But not knowing the Postgres 
> developers' preferences when it comes to these questions, I chose the 
> break-fewer-existing-apps approach.
> If the answer is that the Postgres developers are willing to tell 
> current JDBC users to switch to the Blob/Clob methods when that's what 
> they really mean, I'll remove the switch before submitting the patch.
> -- Bruce


pgsql-hackers by date

Next:From: Lincoln YeohDate: 2001-06-25 06:34:51
Subject: Re: Encrypting pg_shadow passwords
Previous:From: Lincoln YeohDate: 2001-06-25 06:07:53
Subject: Re: Encrypting pg_shadow passwords

pgsql-jdbc by date

Next:From: Dave CramerDate: 2001-06-25 12:11:10
Subject: RE: [ADMIN] High memory usage [PATCH]
Previous:From: Barry LindDate: 2001-06-25 05:40:42
Subject: Re: Instrumenting and Logging in JDBC

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