[DB-SIG] API suggestion: expose 'quote' method
chris at cogdon.org
Thu Jun 5 09:38:09 EDT 2003
Was tempted to that this off-list, but... I think it's useful for
anyone that's not that familiar with ODBC databases.
On Thursday, Jun 5, 2003, at 03:16 US/Pacific, M.-A. Lemburg wrote:
> Chris Cogdon wrote:
>> I believe the python driver ALREADY has access to this information,
>> since it needs it to determine how to correctly pass this information
>> to the DBMS, be it in a string or binary format.
> Not necessarily. In ODBC the database can tell the driver to send
> the data using a certain data type, but that information is only
> known for SQL statements that you actually plan to actually execute
> (and not even in all cases).
So, in other words, it might work like this:
1. application sends a string and some parameters through the 'execute'
2. driver sends the string (only) to the backend through a function
that asks 'how should I send you the parameters?'
3. backend responds.
4. driver sends the string (perhaps), plus parameters (encoded
according to the previous response) to the backend for execution.
Is that right?
If so, that seems to be a particularly bad performance hit, almost not
worth the savings in sending binary data. (Unless i'm missing someting,
of course :)
("`-/")_.-'"``-._ Chris Cogdon <chris at cogdon.org>
. . `; -._ )-;-,_`)
(v_,)' _ )`-.\ ``-'
_.- _..-_/ / ((.'
((,.-' ((,/ fL
More information about the DB-SIG