Server side prepared statements and executemany
От | Luca Ferroni |
---|---|
Тема | Server side prepared statements and executemany |
Дата | |
Msg-id | 5285DF15.3020605@befair.it обсуждение исходный текст |
Ответы |
Re: Server side prepared statements and executemany
Re: Server side prepared statements and executemany |
Список | psycopg |
Hi all, I'm a new subscriber of this list. I use postgresql and python-psycopg2 for some years, mostly through Django, but sometimes directly. First of all, thanks and many compliments for this piece of sotware to the authors. I write about server side prepared statements support. I asked to majordomo-owner for a sweet way to search in the archives, but I haven't got response, so I hope you forgive me if I ask about an argument you have alreasy discussed about. I followed Daniele's post http://initd.org/psycopg/articles/2012/10/01/prepared-statements-psycopg/ and I tried his implementation https://gist.github.com/dvarrazzo/3797445 but I have discovered that it does not work for a syntax error on $1 In the doc I read that cursor.execute() prepares and executes statements. I take a look at the python and c code, but I didn't get where this happens. Can you please me confirm what is written in the doc and how it works? In that case, the Daniele's post on initd.org is to be considered obsoleted? Furthermore: is there a way to call explicitly the SQL PREPARE statement? At the end: can I use "executemany" on SELECT statements, and retrieve results from different selects? how? Thanks again for your works Luca `fero` -- Luca Ferroni http://www.befair.it - http://www.lucaferroni.it Tel: +39 328 9639660 LinkedIn: http://www.linkedin.com/in/lucaferroni
В списке psycopg по дате отправления: