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

From: Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(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-20 04:22:35
Message-ID: CAM9w-_kbCjDMAByo=02e2eNukJtb-VS4s+SdrfZLFZTFs2wyqA@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

--
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB Software Solutions | Pune
"Don't Complain about Heat, Plant a tree"

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

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Khushboo Vashi 2019-02-20 05:26:04 Re: [pgAdmin4][Pattch] - RM #3673 - "Download as .csv" F8 does NOT work when one of joined files is a TEMPORARY file
Previous Message Aditya Toshniwal 2019-02-20 04:22:29 Re: [pgAdmin4][RM3912] Unable to save data if user update primary key with Json data type