[DB-SIG] API suggestion: expose 'quote' method
chris at cogdon.org
Thu Jun 5 11:36:20 EDT 2003
On Thursday, Jun 5, 2003, at 09:18 US/Pacific, M.-A. Lemburg wrote:
> Not quite: the driver/database prepares the statement, ie. it parses
> the SQL, finds out which data types the bound parameters needs and
> then passes this information on to the application.
I know that the postgresql and mysql drivers gleen the datatype
information only from the data being passed as parameters. Do any other
drivers get this from other places, such as the sql or from information
back from the database ?
>> 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 :)
> Huh ? Where's the performance hit ? The more meta-data you have
> on the client side the better and faster the whole process can
> be made. That's also why drivers usually keep a cache of
> schema information on the client side.
It was only a performance hit if the driver was waiting for a response
from the database before sending the data.
> Side note: database wire protocols often have limits to the
> size of the SQL statement you can send, e.g. SAP DB won't
> accept anything much longer than 16kB worth of SQL.
Point conceded. I never suggested that the proposed quote function
would be useful in all circumstances for all datatypes.
("`-/")_.-'"``-._ Chris Cogdon <chris at cogdon.org>
. . `; -._ )-;-,_`)
(v_,)' _ )`-.\ ``-'
_.- _..-_/ / ((.'
((,.-' ((,/ fL
More information about the DB-SIG