psycopg3 inserting dict into JSONB field
psycopg3 inserting dict into JSONB field Question: I have a table with a JSONB field and would like to insert into it using a named dict like so: sql = "INSERT INTO tbl (id, json_fld) VALUES (%(id)s, %(json_fld)s)" conn.execute(sql, {‘id’:1, ‘json_fld’: {‘a’:1,’b’:false, ‘c’: ‘yes’}}); I tried the answers in this question but those all apply …
Total answers: 2