0
cursor = conn.cursor()
qry = """ UPDATE test_jsonb SET details = jsonb_set(details,'{address, flat}', '201'::jsonb) WHERE id = 1 """
cursor.execute(qry)
conn.commit()
print 'Json Element Updated Successfully'

Json Element Updated Successfully

cursor = conn.cursor()
qry = """ UPDATE test_json SET details = json_set(details,'{address, flat}', '201'::json) WHERE id = 1  """
cursor.execute(qry)
conn.commit()
print 'Json Element Updated Successfully'

ProgrammingError: function json_set(json, unknown, json) does not exist LINE 1: UPDATE test_json SET details = json_set(details,'{address, ... ^ HINT: No function matches the given name and argument types. You might need to add explicit type cas

4

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.