SHARE
TWEET

Untitled

a guest Jun 17th, 2019 95 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import psycopg2
  2. conn = psycopg2.connect(dbname=dbn, user=dbuser, password=dbpas, host=dbhost)
  3. cursor = conn.cursor()
  4. cursor.execute(“SELECT * FROM list_oid”)
  5. row = cursor.fetchone()
  6. for row in cursor:
  7.    print(row.decode('utf8'))
  8. cursor.close()
  9. conn.close()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top