Re: The bytea datatype and JDBC

From: "Dave Cramer" <dave(at)fastcrypt(dot)com>
To: Gunnar Rønning <gunnar(at)polygnosis(dot)com>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: The bytea datatype and JDBC
Date: 2001-06-20 20:43:39
Message-ID: 018601c0f9c9$b073dda0$0201a8c0@INSPIRON
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-jdbc

Gunnar,

bytea is an escaped variable length binary datatype.

bytea | variable-length string, binary values escaped

It should work with postgreSQL versions greater than 7.0 now that rows are
not limited.
The implementation is fairly straight forward, unfortunately it would break
existing implementations. Other people would have their blobs stored in
LargeObjects ???

Dave
----- Original Message -----
From: "Gunnar Rønning" <gunnar(at)polygnosis(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Sent: Friday, June 15, 2001 11:23 AM
Subject: [JDBC] The bytea datatype and JDBC

> I saw Tom Lane mentioning the bytea datatype as the way to do BLOBs for
> tables, but I cannot find anything on it in the documentation and
> it is not supported by the JDBC driver as far as I can see.
>
> Where can I get information about it, so I can go on with implementing
support
> for it ?
>
> Is there any performance differences between using BLOB/OID and bytea ?
>
> I cannot use the OID approach with the application in question as it is
> an JDBC app(Turbine from jakarta.apache.org) that relies on asking the
JDBC
> driver for the datatype. Doing this for an OID column does ofcourse return
> integer while you in some instances would like it to return varbinary.
>
> The Turbine people recommend this patch :
> http://jakarta.apache.org/turbine/howto/postgres-howto.html
>
> I don't like this approach as it may break other usages of OID, so hence
my
> desire to use bytea to get something that works.
>
> Turbine is a quite large and nice web app framework in Java, and it would
be
> nice to see more Turbine users go from mysql to pgsql. But this issue is
> a showstopper for a lot of the people trying...
>
> regards,
>
> Gunnar
>
> --
> Gunnar Rønning - gunnar(at)polygnosis(dot)com
> Senior Consultant, Polygnosis AS, http://www.polygnosis.com/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2001-06-20 21:04:07 Re: problem with 010.pgsql.sh start
Previous Message Vince Vielhaber 2001-06-20 20:38:58 Re: Web site gripes

Browse pgsql-jdbc by date

  From Date Subject
Next Message Rainer Mager 2001-06-20 22:19:54 RE: High memory usage
Previous Message Ross J. Reedstrom 2001-06-20 15:35:55 Re: High memory usage