Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import psycopg2
- conn_string = "host='xxxx' dbname='xxx' user='xxx' password='xxx'"
- conn = psycopg2.connect(conn_string)
- cur = conn.cursor()
- cur.execute("query goes here")
- for row in cur.fetchall():
- print(row[0])
Add Comment
Please, Sign In to add comment