I try to insert some data to my PostgreSQl-DB with Python (psycopg2).
Every works fine with my SELECT
-statement like:
cur = g.db.cursor()
cur.execute("""SELECT id FROM mydb where weight>%(weight)s and length<=%(length)s;""",{'weight':weight,'length':length})
Now I try to add some new data, the same way as above. The code is like
cur = g.db.cursor()
cur.execute("""INSERT INTO mydb (id, weight, length) VALUES (%(id)s, %(weight)s, %(length)s, );""",{'id':id,'weight':weight,'length':length})
But I don't see any new rows in pgadmin. Without any error message. I copy also the statement into pgadmin's SQL-Editor and everything works fine.
Has someone some tips to debug, trace down my error?