Re: [Fwd: Re: Problems with truncated BLOB]

From: Barry Lind <barry(at)xythos(dot)com>
To: Mihael Vrbanec <miqster(at)gmx(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [Fwd: Re: Problems with truncated BLOB]
Date: 2001-11-27 03:48:19
Message-ID: 3C030D03.4010800@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Mihael Vrbanec wrote:

> Hi Barry,
>
>
>>I have been able to reproduce your problem with the 7.1 drivers, but not
>>with the 7.2 drivers. It appears that this is bug is already fixed in
>>current sources.
>>
>
> Ok, sounds promising. Now i have a couple of questions:
> 1. Do I only need the new driver and can I use it with 7.1??
> If so, where can I get it??

The 7.2 driver is backward compatible with a 7.1 database. So you only
need the 7.2 driver. You can download it from the
http://jdbc.postgresql.org web site. Get the latest development build
for 7.2.

> 2. If I need to use 7.2 (is not released yet, afaik), is it quite stable
> and can it be used in a low risk/low load environment without breaking
> too much?? It is important that the system works most of the time...:-)
>

You don't need to upgrade the database to 7.2. You can use the 7.2
driver against a 7.1 database.

thanks,
--Barry

>
>>Note however that the functionality around get/setBinaryStream() has
>>changed in 7.2. In 7.2 the default behavior is that binary data is
>>assumed to be in a column of type bytea. So you would create a table
>>as: create table blobs (filename text, data bytea) instead of using the
>>OID datatype as in 7.1 (create table blobs (filename text, data OID)).
>>For backward compatibility you can revert the driver back to the old
>>behavior of using LargeObjects (i.e. OIDs) by passing the compatible=7.1
>>parameter to the connection. (This can be done by addint
>>'?compatible=7.1' to the end of the jdbc connection url.
>>
>>Attached are modified versions of the test case you sent that work for
>>me using the 7.2 drivers (but do show the bug using the 7.1 drivers).
>>The first (BlobTest.java) uses the new functionality and requires that
>>the table 'blobs' have a column named 'data' of type 'bytea'. The
>>second (BlobTest2.java) uses the backward compatible mode and requires
>>that the table 'blobs2' have a column named 'data' of type 'oid'.
>>
>
> Thanks a lot for your fast and helpful responses!!!!
>
> bxe Miq
>
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Anjali Jain 2001-11-27 04:49:20 Postgres database.
Previous Message Barry Lind 2001-11-27 02:20:03 Re: [HACKERS] insert/update/delete statements returning a query response