I have a dictionary which represents one row from a table.
For example my table is this:
CREATE TABLE test (
id char(5) CONSTRAINT firstkey PRIMARY KEY,
column1 varchar(40) NOT NULL,
column2 integer
);
My dict looks like this:
mydict = {'id':'row11', 'column1':'abcdef', 'column2':4}
Now i am searching for an elegant generic way to update this data in the table with Psycopg2 similar to the way it is described for an insert statement here:
Insert Python Dictionary using Psycopg2
Or is this not possible with an update-statement?