Azure Data Studio - PostgreSQL error: Unhandled exception while executing query: 'dict' object has no attribute 'encode'
I started using Azure Data Studio a few weeks ago to talk to PostgreSQL and I must say that I do like it, especially when comparing it to PGAdmin. I had a few issues where I lost my connection, but a refresh always solved it so far.
Yesterday I stumbled over an error when trying to execute the following query:
When executing this query, it failed with the following error message:
Started executing query at Line 1
Commands completed successfully
Unhandled exception while executing query: 'dict' object has no attribute 'encode'
Total execution time: 00:00:00.138
The problem happens when I try to query the payloadjson column which contains a JSONB type. As a workaround I explicitly added a cast to JSON to the query:
More information: https://github.com/Microsoft/azuredatastudio-postgresql/issues/94