Re: [RFC] ideas for a new Python DBAPI driver (was Re: libpq test suite) - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [RFC] ideas for a new Python DBAPI driver (was Re: libpq test suite)
Date
Msg-id 511EA865.3010009@gmx.net
Whole thread Raw
In response to Re: [RFC] ideas for a new Python DBAPI driver (was Re: libpq test suite)  (Marko Tiikkaja <pgmail@joh.to>)
Responses Re: [RFC] ideas for a new Python DBAPI driver (was Re: libpq test suite)
List pgsql-hackers
On 2/14/13 2:42 PM, Marko Tiikkaja wrote:
>> I think the reason this doesn't work is that in order to prepare a query
>> you need to know the parameter types, but you don't know that in Python,
>> or at least with the way the DB-API works.  For example, if you write
>>
>> cur.execute("SELECT * FROM tbl WHERE a = %s AND b = %s", (val1, val2))
>>
>> what types will you pass to PQsendQueryParams?
> 
> Pardon me if this is obvious, but why would you need to pass any types
> at all?  Assuming we're still talking about PQsendQueryParams and not an
> explicit prepare/execute cycle..

Well, PQsendQueryParams() requires types to be passed, doesn't it?




pgsql-hackers by date:

Previous
From: Manlio Perillo
Date:
Subject: Re: [RFC] ideas for a new Python DBAPI driver (was Re: libpq test suite)
Next
From: Daniele Varrazzo
Date:
Subject: Re: [RFC] ideas for a new Python DBAPI driver (was Re: libpq test suite)