mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-26 02:43:43 +03:00
9de46e416e
Forward compatible with newer Pythons.
9 lines
209 B
Python
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)
|