psycopg2/sandbox/test814.py
Jon Dufresne 9de46e416e Use print() function instead of print statement throughout project
Forward compatible with newer Pythons.
2017-12-10 10:51:07 -08:00

9 lines
209 B
Python

import psycopg2
import psycopg2.extras
conn = psycopg2.connect("dbname=test")
curs = conn.cursor()
curs.execute("SELECT true AS foo WHERE 'a' in %s", (("aa", "bb"),))
print(curs.fetchall())
print(curs.query)