This project is archived and is in readonly mode.
Insert with RETURNING mutilple values returns them in a string
-
Daniele Varrazzo
- State changed from new to invalid
That's because you have put the RETURNING values into parenthesis, so postgres is returning a record value for which psycopg doesn't have a typecaster.
You have to use:
cur.execute("""INSERT INTO items (userId, count, label, editId) VALUES (%s, %s, %s, %s) RETURNING id,editId,count,label""",This is no psycopg bug, so closing. bye!