Re: improving async support in psycopg

Tim Roberts <[email protected]> Wed, 24 Mar 2010 14:39:20 -0700
Newsgroups gmane.comp.python.db.psycopg.devel
Organization Providenza & Boekelheide, Inc.
Message-ID <[email protected]>
Jan UrbaƄski wrote:
> On 24/03/10 21:27, Federico Di Gregorio wrote:
>>
>> I'll start by this email. I don't agree on exposing more and more
>> features of libpq. While async is surely backend specific (especially if
>> done trhough libpq) I'd like to keep the API generic enough to be
>> implemented by other database adapters.
>
> I agree 100%. Let's start by designing an API then, although I don't
> know anything about other databases, so I won't be able to tell if
> similar things would be possible for MySQL or Oracle etc.

Let us not lose sight of the fact that psycopg2 is intended to be an
abstraction, based on a database-neutral standard (DBAPI 2).  It is not
intended to provide low-level access to Postgres.  I would be quite
upset to find a whole set of new Postgres-specific features added to
psycopg2 at this point.  That's not what it's for.

Now, I'm not arguing that low-level access is necessarily a bad thing
(although, having done a number of very painful database transitions
over the years, I'm certainly willing to argue that), but it doesn't
belong in psycopg2.  If someone wants to create a separate package that
wraps the Postgres native API for Python in a direct and low-level way,
that's fine, but it should not be part of psycopg2.  I should be able to
take my psycopg2 application, replace the "psycopg2" instance with
"pyMySQL", and have it Just Work.

-- 
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.

_______________________________________________
Psycopg mailing list
[email protected]
http://lists.initd.org/mailman/listinfo/psycopg