From: | Jesse <jeichar(at)refractions(dot)net> |
---|---|
To: | Oliver Jowett <oliver(at)opencloud(dot)com> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: bytea encoding |
Date: | 2005-05-12 17:31:59 |
Message-ID: | 1115919119.4902.7.camel@weasel |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
My problem is this:
I want to send a binary file in a CDATA section of an xml file to a
server that will then turn around and put the binary file a bytea
column.
Is there a way that I can use postgresql-74.213.jar (or more recent) to
encode the file in bytea on the client side? If no, do you know where I
can get code to do that?
If the server puts data in the database will the database recognize that
it is bytea already?
thank you,
Jesse
On Thu, 2005-05-12 at 09:53 +1200, Oliver Jowett wrote:
> Jesse Eichar wrote:
>
> > 1. Is the byte stream (or byte array) converted to bytea on the database
> > side or on client before sending? (My client is using the
> > postgresql-74.213.jar).
>
> You give the driver a byte[] (setBytes) or InputStream
> (setBinaryStream); it does the rest. Old drivers such as build 213 will,
> IIRC, convert this to a text representation internally before sending to
> the backend; newer drivers will send the data directly without
> conversion. But this is all transparent to the client.
>
> -O
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2005-05-12 19:31:07 | Re: [NOVICE] Using PgSQL in high volume and throughput problem |
Previous Message | Dave Cramer | 2005-05-12 16:57:53 | Re: ERROR in 8.0 driver, but not 7.4: SELECT DISTINCT, ORDER |