From: | Barry Lind <barry(at)xythos(dot)com> |
---|---|
To: | Marc Lavergne <mlavergne-pub(at)richlava(dot)com> |
Cc: | Benoit Menendez <benoitm(at)pacbell(dot)net>, pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Blob support... |
Date: | 2002-02-06 02:19:01 |
Message-ID: | 3C609295.8080406@xythos.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Marc,
The "authoritative statement on what the postition on BLOBs in 7.2" is
in the documentation for 7.2. The section on storing binary data with
jdbc explains what 7.1 did, what 7.2 does and how to revert to the 7.1
behavior for backward compatibility. It also explains why you might
want to use bytea vs. LargeObjects to store binary data and gives
examples on how to do both.
--Barry
Marc Lavergne wrote:
> Right ... there's a few "bugs" unconfirmed but it is in my eyes in
> org.postgresql.jdbc2.PreparedStatement and ResultSet. Look in the source
> (postgresql-7.2/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet and
> you'll see that the code was branched right around line 330.
> Unfortunately, that breaks support for lo types in 7.2. Not I'm not sure
> WHAT the official position is on this. However, there are four things
> you can do: use the 7.1.3 JDBC driver, custom fix the 7.2 driver (ie.
> remove the if statement to revert to 7.1.3 behavior), submit a diff
> patch, file a bug and hope somebody fixes it. Obviously, the first and
> second options are the easiest. The third and fourth would require some
> kind of authoritative statement on what the position on BLOBs in 7.2 is!
>
> Hope this helps and good luck!
>
> Marc
>
> Benoit Menendez wrote:
>
>> I use the latest stable 7.2.2 under cygwin
>>
>> Benoit
>>
>> ----- Original Message -----
>> From: "Marc Lavergne" <mlavergne-pub(at)richlava(dot)com>
>> To: "Benoit Menendez" <benoitm(at)pacbell(dot)net>
>> Cc: <pgsql-jdbc(at)postgresql(dot)org>
>> Sent: Tuesday, February 26, 2002 11:13 AM
>> Subject: Re: [JDBC] Blob support...
>>
>>
>>
>>> Which release of PostgreSQL? There were numerous changes in BLOB support
>>> from 7.0 to 7.1 to 7.2, your answer depends on the target release of
>>> PostgreSQL.
>>>
>>> Benoit Menendez wrote:
>>>
>>>
>>>> I use both ODBC and JDBC to access the same database (from two
>>>> different
>>>> applications) and I need blob support...
>>>>
>>>>
>>>>
>>>> I have created and used the "lo" type which is handled correctly by the
>>>> ODBC driver...
>>>>
>>>>
>>>>
>>>> But JDBC does not like the "lo" type for blobs...
>>>>
>>>>
>>>>
>>>> If I do a getBytes on an "lo" I only get 4 (+1) bytes...
>>>>
>>>>
>>>>
>>>> I tried "bytea" but ODBC does not work properly with this type...
>>>>
>>>>
>>>>
>>>> Is the "lo" type supported in a recent patch?
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>>
>>>>
>>>> Benoit
>>>>
>>>>
>>>
>>
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 6: Have you searched our list archives?
>>
>> http://archives.postgresql.org
>>
>>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
From | Date | Subject | |
---|---|---|---|
Next Message | Barry Lind | 2002-02-06 02:33:40 | Re: Multibyte or not? |
Previous Message | David Hooker | 2002-02-05 22:58:33 | Re: Arrays returned in a result set |