X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 5EEFCD1BB1E for ; Thu, 21 Aug 2003 07:35:50 -0300 (ADT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 57824-09 for ; Thu, 21 Aug 2003 07:35:42 -0300 (ADT) Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by svr1.postgresql.org (Postfix) with SMTP id 16D0FD1BB3B for ; Thu, 21 Aug 2003 07:35:38 -0300 (ADT) Received: (qmail 13480 invoked from network); 21 Aug 2003 10:35:40 -0000 Received: from unknown (HELO viscomail.tpf.co.jp) (100.0.0.108) by sd2.tpf-fw-c.co.jp with SMTP; 21 Aug 2003 10:35:40 -0000 Received: from tpf.co.jp ([126.0.1.65]) by viscomail.tpf.co.jp (8.8.8+Sun/8.8.8) with ESMTP id TAA02908; Thu, 21 Aug 2003 19:35:39 +0900 (JST) Message-ID: <3F44A0A3.8363A1@tpf.co.jp> Date: Thu, 21 Aug 2003 19:36:19 +0900 From: Hiroshi Inoue X-Mailer: Mozilla 4.73 [ja] (Windows NT 5.0; U) X-Accept-Language: ja MIME-Version: 1.0 To: Andre Felipe Machado Cc: pgsql-odbc@postgresql.org Subject: Re: large objects and pg 7.3.x with OpenOffice.org References: <003201c3672a$31069c30$3d283ddb@PbgX> <200308201413.44280.andremachado@techforce.com.br> Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/50 X-Sequence-Number: 3170 Andre Felipe Machado wrote: > > 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 [ODBC][7485][SQLBindParameter.c][186] Entry: 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. regards, Hiroshi Inoue http://www.geocities.jp/inocchichichi/psqlodbc/