Re: Please help with binary file

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: Please help with binary file
Дата
Msg-id Pine.LNX.4.33.0307020919290.3542-100000@leary.csoft.net
обсуждение исходный текст
Ответ на Re: Please help with binary file  (Fernando Nasser <fnasser@redhat.com>)
Список 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 по дате отправления:

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: db
Следующее
От: Fernando Nasser
Дата:
Сообщение: Re: Please help with binary file