[pgAdmin4][RM3912] Unable to save data if user update primary key with Json data type

From: Aditya Toshniwal <aditya(dot)toshniwal14(at)gmail(dot)com>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: [pgAdmin4][RM3912] Unable to save data if user update primary key with Json data type
Date: 2019-02-19 12:41:53
Message-ID: CAB2fNHCW7+BXqBjcxm7=L6tCZEMsEzgkB6+tAkTDDiGiZqLRVg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Hackers,

Attached is the patch to fix the issue where updating data (using
view/edit) of primary key column where data type of that column is
json/jsonb throws exception psycopg2.ProgrammingError: can't adapt type '
dict'.
The adapt function of psycopg2 does not support dict data type. Instead,
http://initd.org/psycopg/docs/extras.html#json-adaptation can be used.

Kindly review.

Thanks and Regards,
Aditya Toshniwal

Attachment Content-Type Size
RM3912.patch application/octet-stream 962 bytes

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2019-02-19 13:19:49 pgAdmin 4 commit: Convert the JSON output from yarn properly
Previous Message Akshay Joshi 2019-02-19 06:58:16 [pgAdmin4][Patch]: RM #3958 Query Tool commits after SELECT statements regardless of 'Auto commit' setting