Обсуждение: best way to use bitvarying?

Поиск
Список
Период
Сортировка

best way to use bitvarying?

От
Laurette Cisneros
Дата:
Hi all,

We would like to store *small* images into bitvarying fields.  These will
then be read in via jdbc and eventually rendered in a browser.  What is the
best way to pull them into Java?  Is there a type and methods that are best
suited for this data type?  Currently, we are using text and treating it as
a string of 0's and 1's.  Any suggestions for a better way?

Thanks for your help,

--
Laurette Cisneros
(510) 420-3137
NextBus Information Systems, Inc.
www.nextbus.com
Passenger Information Everywhere
select count(*) from blessings;


Re: best way to use bitvarying?

От
Tom Lane
Дата:
Laurette Cisneros <laurette@nextbus.com> writes:
> We would like to store *small* images into bitvarying fields.

Wouldn't BYTEA be a better choice?  Do you really want to treat the data
a bit at a time, rather than a byte at a time?

            regards, tom lane

Re: best way to use bitvarying?

От
Laurette Cisneros
Дата:
Last I was hearing (see http://lab.applinet.nl/postgresql-jdbc/#Lob) "bytea
is currently unsupported in the jdbc interface".  Is this not true for 7.2?
Is there a suggested way of using this with jdbc?

Thanks for the help,

L.
On Mon, 7 Jan 2002, Tom Lane wrote:

> Laurette Cisneros <laurette@nextbus.com> writes:
> > We would like to store *small* images into bitvarying fields.
>
> Wouldn't BYTEA be a better choice?  Do you really want to treat the data
> a bit at a time, rather than a byte at a time?
>
>             regards, tom lane
>

--
Laurette Cisneros
(510) 420-3137
NextBus Information Systems, Inc.
www.nextbus.com
Passenger Information Everywhere


Re: best way to use bitvarying?

От
Barry Lind
Дата:
Laurette,

bytea is supported in 7.2, and the 7.2 drivers will work against either
a 7.1 or 7.2 database.  You can download the latest 7.2 drivers from
jdbc.postgresql.org.

thanks,
--Barry

Laurette Cisneros wrote:

> Last I was hearing (see http://lab.applinet.nl/postgresql-jdbc/#Lob) "bytea
> is currently unsupported in the jdbc interface".  Is this not true for 7.2?
> Is there a suggested way of using this with jdbc?
>
> Thanks for the help,
>
> L.
> On Mon, 7 Jan 2002, Tom Lane wrote:
>
>
>>Laurette Cisneros <laurette@nextbus.com> writes:
>>
>>>We would like to store *small* images into bitvarying fields.
>>>
>>Wouldn't BYTEA be a better choice?  Do you really want to treat the data
>>a bit at a time, rather than a byte at a time?
>>
>>            regards, tom lane
>>
>>
>