Re: [RFC] ideas for a new Python DBAPI driver (was Re: libpq test suite)

Поиск
Список
Период
Сортировка
От P. Christeas
Тема Re: [RFC] ideas for a new Python DBAPI driver (was Re: libpq test suite)
Дата
Msg-id 201302180055.35145.xrg@linux.gr
обсуждение исходный текст
Ответ на [RFC] ideas for a new Python DBAPI driver (was Re: libpq test suite)  (Manlio Perillo <manlio.perillo@gmail.com>)
Список pgsql-hackers
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!



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: JSON Function Bike Shedding
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: PATCH: Split stats file per database WAS: autovacuum stress-testing our system