I have not yet solved the issue with Win exceptions when printing pg query objects. I don't think it's a big problem, but it would be nice to have that fixed as well. If you have any ideas, let me know. What I found out so far is that the exceptions happen in PQprint(). If I use a self-compiled version of libpq.dll, then I do not get an exception. It happens only with the dll in the official binary release of PG for Win.
I think I found the explanation today: PyGreSQL was compiled as a Python 2.4.2 extension module which uses msvcr71.dll, but the PostgreSQL 8.1.2 binary distribution uses msvcrt.dll. What happens is that Python prints something to stdout, and PyGreSQL passes this stdout file descriptor of Python (i.e. of msvcr71) to the PQprint function which in turn passes it to fprint (of msvcrt). Now the msvcrt function tries to print something to a msvcr71 file descriptor which does not work ("invalid handle" exception). When I used my self-compiled version of libpq.dll I did not run into this problem because I used msvcr71.dll as well.
Any ideas how to solve this problem? -- Christoph _______________________________________________ PyGreSQL mailing list [email protected] http://mailman.vex.net/mailman/listinfo/pygresql
