Passing variable to SQL statement when using psycopg2

Gregory Ewing greg.ewing at canterbury.ac.nz
Mon Aug 30 04:22:21 EDT 2010


Chris Rebert wrote:
> On Sun, Aug 29, 2010 at 11:29 PM, Julia Jacobson

>>Where does the "E" in front of 'xyz' come from?
>>It's probably the reason, why my query doesn't work.
> 
> Quite doubtful, considering the example in the psycopg2 docs also has the E:
> http://initd.org/psycopg/docs/cursor.html#cursor.mogrify

Seems to be a postgres extension to the sql string literal syntax:

    http://issues.liferay.com/browse/LEP-3182

-- 
Greg



More information about the Python-list mailing list