From: | Gustavo Muñoz <gmunoz(at)interware(dot)com(dot)mx> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: LargeObject problems (more INFO) |
Date: | 2003-02-24 16:32:58 |
Message-ID: | 3E5A493A.5090900@interware.com.mx |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hi
I posted this yesterday, but got no response, maybe the subject wasn't
very descriptive or I didn't provide some key information.
I'm using Windows 2000 Server in English, and Sun JDK 1.4.1_01.
Postgres' version is 7.3.2.
I read the documentation,
http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=jdbc-binary-data.html
<http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=jdbc-binary-data.html>
And I did the things exactly as indicated, but my problem is that the
LargeObject modifies my data: it keeps the same number of bytes, but
they differ. And with the strict-JBDC API, I get an OutOfMemoryError. On
this, I know that Postgres crew say this method consumes a lot of
memory, but I'm trying to store 10Mb and set Xmx jvm flag very large and
always fails.
Maybe someone from TeamB, knows something about encoding problems
(target LargeObject method). I expected Postgres just to store de bytes
as they were given, in order to be able to retrive them untouched
Maybe I'm not using the right driver. I'm using the driver that is
distribuited with cygwin.
I'm going to test this exact code, in Linux.
Next step is to debug the source code. But before doing that I want to
be sure I'm doing the right steps.
Here is my original post:
I have inserted a LargeObject using LargeObject Postgres API but when I
get back the bytes they are changed in some way. For instance, if I
insert the bytes of a zip or a jpg file (and the files are ok, because I
can view the contents) when I retrieve the bytes from the database and
create new files with the bytes, the original files and the new ones
differ. They contain the same number of bytes, but they differ. No
longer winzip or iexplorer open the new files, and diff says the files
differ.
I'm using windows version of postgres, and jdk1.4.1_01
The field's data type is oid, of course
By the way, if I use the JDBC standard API (setBytes o setBinaryStream
using bytea) I get an OutOfMemoryError with files with size equals or
larger than 10Mb.
Dirk Bromberg wrote:
> see in the documentation
>
> http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=jdbc-binary-data.html
> <http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=jdbc-binary-data.html>
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: pgsql-jdbc-owner(at)postgresql(dot)org
> [mailto:pgsql-jdbc-owner(at)postgresql(dot)org] Im Auftrag von carloszaparoli
> Gesendet: Montag, 24. Februar 2003 13:38
> An: pgsql-jdbc(at)postgresql(dot)org
> Betreff: [JDBC] Field BLOB
>
> I need include a field BLOB.
>
> Who???
>
> Carlos Zaparoli (__)]
> Business Analyst
> Zaparoli Information Technology
>
From | Date | Subject | |
---|---|---|---|
Next Message | Barry Lind | 2003-02-24 16:42:45 | Re: case problem with moveToInsertRow() - 7.4dev drivers OK, |
Previous Message | Tony Grant | 2003-02-24 14:41:07 | Re: sample JSP code connecting to PostgreSQL |