From: | Kris Jurka <books(at)ejurka(dot)com> |
---|---|
To: | Fernando Nasser <fnasser(at)redhat(dot)com> |
Cc: | Paul Thomas <paul(at)tmsl(dot)demon(dot)co(dot)uk>, Akash Shah <akash(dot)s(at)ap(dot)sony(dot)com>, "pgsql-jdbc (at) postgresql (dot) org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: Please help with binary file |
Date: | 2003-07-02 13:37:02 |
Message-ID: | Pine.LNX.4.33.0307020919290.3542-100000@leary.csoft.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Fernando Nasser | 2003-07-02 13:39:17 | Re: Please help with binary file |
Previous Message | scott.marlowe | 2003-07-02 13:15:10 | Re: db |