On Thursday 14 February 2013, Manlio Perillo wrote:
> Il 14/02/2013 14:06, Albe Laurenz ha scritto:
> > Manlio Perillo wrote:
> >> Sorry for the question, but where can I find the libpq test suite?
> >> I can not find it in the PostgreSQL sources; it seems that there are
> >> only some examples, in src/test/examples.
> >
> For my Python DBAPI2 PostgreSQL driver I plan the following optimizations:
>
> 1) always use PQsendQueryParams functions.
>
> This will avoid having to escape parameters, as it is done in
> psycopg2
> (IMHO it still use simple query protocol for compatibility purpose)
>
> 2) when the driver detects a Python string is being sent to the
> database, use binary format.
>
> As a special case, this will avoid having to use PQescapeByteaConn
> when sending binary string (e.g. byte strings in Python 3.x)
> ....
Perhaps you could also see some attempt I'd made to support binary protocol
inside psycopg2, some time ago:
https://github.com/xrg/psycopg/tree/execparams2
--
Say NO to spam and viruses. Stop using Microsoft Windows!