Thread: lo_import problem under Windows+BCB5

lo_import problem under Windows+BCB5

From
Bistey Csaba
Date:
I have a problem, i try to use libpq with Borland C++ Builder 5 
Standard, everything works fine, but when i try to import a large object 
with lo_import it import it, but when i lo_export it the result only the 
original binary file until the first EOF character.

The backend  is a Debian linux, with PostgreSql 7.2.1 .
The frontend is Windows 2000/XP/9x, Borland C++ Builder, libpq.dll 
compiled with Visual C++.

Thanks for your help!

Bistey Csaba



Re: lo_import problem under Windows+BCB5

From
Andreas Kretzer
Date:
Bistey Csaba wrote:

> I have a problem, i try to use libpq with Borland C++ Builder 5
> Standard, everything works fine, but when i try to import a large object
> with lo_import it import it, but when i lo_export it the result only the
> original binary file until the first EOF character.
>
> The backend  is a Debian linux, with PostgreSql 7.2.1 .
> The frontend is Windows 2000/XP/9x, Borland C++ Builder, libpq.dll
> compiled with Visual C++.

I think there is no problem with your compiler nor with the backend!
I have the same probs under Tcl/Tk. I even tried to do read and write
the file with the standard Tcl/Tk file i/o-ops setting translation to binary
and disabled EOF-char explicitly. But with almost no success. It ended
up in some Unicode-trouble I guess :-( This is definetly a windows problem
because you can do lo_import/lo_export directly on the unix machine
(using psql) and it there works fine.

So what I finally did was using the backend lo_import / lo_export via
SQL language on a specific directory which was made available to the
windows clients via Samba.

Hope this helps
Andreas