Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try:
- conn = psycopg2.connect("dbname='test1' user='postgres' host='localhost' password='123'")
- cur = conn.cursor()
- cur.execute("""INSERT INTO product_info (product_name) VALUES (%s)""", 'xxx')
- except:
- print "error happens"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement