Issue 18488 - unable to store images into a PostgreSQL db
Summary: unable to store images into a PostgreSQL db
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 RC3
Hardware: All Linux, all
: P3 Trivial with 1 vote (vote)
Target Milestone: OOo 2.0
Assignee: marc.neumann
QA Contact: issues@dba
Depends on:
Reported: 2003-08-21 12:26 UTC by andremachado
Modified: 2006-05-31 14:29 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description andremachado 2003-08-21 12:26:39 UTC
I am trying to use and a form to store images into a Postgresql 7.3.2 db, 
connected through psqlodbc 7.03.0100 (the latest for windoze) or unixodbc 2.2.6 (the latest for 
I am able to DISPLAY previously inserted images on records. But unable to insert new ones. 
After contacting the postgresql ODBC driver authors, sql logs were sent, and you can read 
below an excerpt of the last message: 
> I guess that openoffice escapes the binary file, in order to to 
> pass it by value into a SQL statement, as it is recommended for 
> bytea and for mysql BLOBs. But pg odbc driver expects raw binary 
> file, not escaped one, for longvarbinary. And postgresql/contrib/lo 
> also does expect a file name, not a parsed by value. 
The problem I see in the log you sent is 
                        Statement = 0x81e39b0             
                        Param Number = 2             
                        Param Type = 1             
                        C Type = -2 SQL_C_BINARY             
                        SQL Type = -2 SQL_C_BINARY 
OpenOffice is binding SQL_BINARY(SQL_C_BINARY seems a unixODBC's 
bug) SQL Type parameter not an SQL_LONGVARBINARY one. Unfortunately 
I don't understand the reason. 
Though I don't love the *bytea* type, you can turn on 
the *bytea as LO* DSN option. *bytea* is only for not 
so large objects. 
Hiroshi Inoue
Comment 1 Frank Schönheit 2003-08-21 14:26:46 UTC
correcting sub component and default owner
Comment 2 marc.neumann 2003-08-26 15:31:15 UTC
something for you I think.
Comment 3 ocke.janssen 2003-08-29 12:36:23 UTC
set target
Comment 4 ocke.janssen 2003-08-29 14:11:20 UTC
Comment 5 ocke.janssen 2004-01-30 14:23:34 UTC
seems to be fixed in cws oj08
Comment 6 hans_werner67 2004-02-02 12:18:08 UTC
change subcomponent to 'none'
Comment 7 ocke.janssen 2004-02-02 13:44:40 UTC
Comment 8 marc.neumann 2004-03-01 15:00:20 UTC
set to fixed
Comment 9 marc.neumann 2004-03-01 15:00:43 UTC
verify in CWS oj08
Comment 10 marc.neumann 2004-04-27 09:58:53 UTC

fixed in current developer build -> close.
The current developer build can be found at
Feel free to reopen if this issue is not fixed in the developer build.

Bye Marc