Re: Please help with binary file - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Please help with binary file
Date
Msg-id Pine.LNX.4.33.0307020919290.3542-100000@leary.csoft.net
Whole thread Raw
In response to Re: Please help with binary file  (Fernando Nasser <fnasser@redhat.com>)
List pgsql-jdbc

On Wed, 2 Jul 2003, Fernando Nasser wrote:

> Paul Thomas wrote:
> >
> > On 02/07/2003 06:38 Akash Shah wrote:
> >
> >> Hi ,
> >>
> >> I am trying to upload binary file to the PostgreSQL 7.3.2 with JDBC3
> >> driver
> >> supplied by postgresql (pg73jdbc3). The table to which I am trying to
> >> save
> >> the file has a field of OID datatype. And while doing so I get
> >>
> >> "java.sql.SQLException: ERROR: oidin.............."  error.
> >>
> >> I tried changing OID data type to bytea. After that code worked and I
> >> tried
> >> file sizes from 4KB to1.6 MB. If file size is larger than that ( even for
> >> a
> >> 10 MB size file ) execution just gets stuck. No error,  no exception
> >> thrown.
> >
> >
> > Reaed the docs (5.6 Storing Binary Data). They give sample code of how
> > to use Large Objects with JDBC. I think this will do what you want.
> >
>
> And don't use bytea until 7.4, when the new V3 protocol is on unless you
> have real security issues with other people being able to read your LOB
> (PostgreSQL LO facility is not secure while bytea is).

In an attempt to clarify, are you really trying to say that the
performance of bytea is poor without the V3 protocol, so it is better to
use large objects unless security is a requirement because other database
users can potentially view your large objects?

>
> You would need a patch to use bytea with 7.3 but it is not an ideal
> solution so you should avoid it (it has not been incorporated to the
> sources so you would have to get into the business of building the
> driver yourself).

What patch is needed for bytea and 7.3?


Kris Jurka


pgsql-jdbc by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: db
Next
From: Fernando Nasser
Date:
Subject: Re: Please help with binary file