Re: Use of .mogrify
От | Daniele Varrazzo |
---|---|
Тема | Re: Use of .mogrify |
Дата | |
Msg-id | CA+mi_8b1bB8esZT3PGbEyviFaE0nL+wo3Y8DAhVCipZi8TjLzg@mail.gmail.com обсуждение исходный текст |
Ответ на | Use of .mogrify (Tobias Fielitz <tobias@streethawk.com>) |
Список | psycopg |
On Thu, Apr 3, 2014 at 1:00 AM, Tobias Fielitz <tobias@streethawk.com> wrote: > Hi All, > > I just stumbled across this conversation: > http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/4775 > > Is .mogrify still just for debugging usage? That message is still valid: currently mogrify does what you expect (actually better than it used to do in 2008). But in the future we don't guarantee that (actually, if we move to sending parameters to the server, new cursor classes may not have a mogrify method at all). > I have a query generated by Django's ORM that I would like to execute as > plain SQL (because I will wrap some SQL around it). Why don't you wrap the SQL around the query with placeholders and then pass the parameters? -- Daniele
В списке psycopg по дате отправления: