On 27 March 2014 19:11, VernonCole <[email protected]> wrote:

> There was a recent query about prepared statements on the db-sig mailing
> list, too. Apparently thought is being given to adding such functionality
> to Psycopg. If such functionality is added, it could be useful to support,
> I suppose. Some SQL engines apparently benefit from the techinque. MS SQL
> Server is not one of them, so I have not bothered to add support for them
> to adodbapi.  If I do so, it will use the same api as mxodbc uses now (a
> copy of the SQL statement is kept with the cursor). [note: my reading of
> Microsoft's recommendation is not "don't do that", it is "why bother?".]
>
> Pep-0249 is silent on the subject of how to support prepared statements,
> so any existing systems are likely to do so differently.  In particular,
> there can be no expectation that there is any support whatsoever for the
> concept, so it will have to be emulated where not present (-- i.e. almost
> everywhere).
>

Yeah... the only places PEP 249 mentions prepare is in execute and
executemany... where I'm fairly sure almost no drivers do "prepare and
execute".

As for lack of existing support, I suspect there's a degree of "if you
build it, they will come" to this... worst case is to simply implement it
as raw SQL.

--
C

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAG_XiSAswQGnPFvYE4ugYN1sKpL%2B7PKF4t8%2BGBuoKJoU28JV8g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to