I have already asked at the PG and Py forums, but it seems there is no
convenient solution to solve the compatibility issues between the FILE
structures of Python 2.4.2 (msvcr71) and PostgreSQL 8.1.2 (msvcrt) under
Windows. However, the only place where this is a problem because a FILE
structure is passed from Python to Postgres, are the two PQprint()
calls. So my idea is to get rid of these calls.
PQprint() is problematic anyway because it uses pg_printf now, which is
not defined in libpq.dll (you must undef USE_REPL_SNPRINTF as a
workaround, but it is a pitfall), and because PQprint() is considered
obsolete and may vanish in future versions of PostgreSQL.
PQprint() is currently used only in two places,
1) for printing "pgquery" objects (which are used by pg)
2) for printing "pgsource" objects (which are indirectly used by pgdb)
I think we can ignore 2) anyway because pgsource objects are only used
internally, they are only a private attribute of cursor objects.
Concerning 1), it may be convenient to print a query object during
debugging, because the output is formatted in columns.
So my suggestion is to include a simplified version of PQprint into
PyGreSQL and don't call the PQprint function of Postgres any longer.
If nobody is against this, I will implement it this weekend.
-- Christoph
_______________________________________________
PyGreSQL mailing list
[email protected]
http://mailman.vex.net/mailman/listinfo/pygresql