Python psycopg2 not inserting into postgresql table

前端 未结 4 1051
抹茶落季
抹茶落季 2020-12-09 01:14

I\'m using the following to try and insert a record into a postgresql database table, but it\'s not working. I don\'t get any errors, but there are no records in the table.

4条回答
  •  爱一瞬间的悲伤
    2020-12-09 02:11

    import psycopg2
    conn = psycopg2.connect("dbname='djangostack' user='bitnami' 
    host='localhost' password='password'")
    con.set_session(autocommit=True)
    

提交回复
热议问题