Re: Confusion over Python drivers - Mailing list pgsql-hackers

From Andrew McNamara
Subject Re: Confusion over Python drivers
Date
Msg-id 20100208012543.656F8206F0@longblack.object-craft.com.au
Whole thread Raw
In response to Re: Confusion over Python drivers  (Greg Smith <greg@2ndquadrant.com>)
Responses Re: Confusion over Python drivers  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
>I added you into the list at http://wiki.postgresql.org/wiki/Python

Thanks.

>Can you check what I put in there, confirm Windows compatibility, and 
>comment on Python 3.X support?

I haven't tried it under Windows and I haven't had any feedback either
way from Windows users. 

For now, ocpgdb has no Python 3 support (I don't foresee any real
problems, however).

>I'd be curious to hear more about the escaping bugs you ran into as well.
>We already have some notes on the TODO that pushing more of this work
>toward the standard libpq routines would seem appropriate for things
>passing between the driver and libpq.  Were the issues you ran into on
>that side, or more on the Python side of how things were being formatted?

It was a while ago now and I can't remember the specific details - it was
more a general feeling that the existing offerings were going about it
the wrong way (with respect to parameter passing and escaping). I suspect
this was a historical artifact (presumably libpq didn't provide escaping
facilities or parameterised queries when the adapters were written).

Essentially, I just wanted a pyPgSQL with a more modern implementation.
Psycopg was (is?) also using Protocol 2. I felt that the way forward was
to switch to the Protocol 3 API features, in particular, parameterised
queries, and none of the existing Python adapters had done that (I got
the impression while writing my module that nobody was exercising the
new features).

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Add on_plperl_init and on_plperlu_init to plperl UPDATE 3 [PATCH]
Next
From: Andres Freund
Date:
Subject: Re: Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)