Search code examples
jsonpostgresqltype-conversionjsonbpgadmin

pgAdmin: Casting null JSONB to JSON returns connection closed


I was testing out some basic operations while working on a query to perform operations on a JSON column. When I ran this query:

SELECT NULL::jsonb::json

I received the following error message: Not connected to the server or the connection to the server has been closed.

The server is alive and well, any other query works but anything that revolves around this particular type cast seems to be "crashing" the parser/planner/server. Any explanation on why this particular query triggers this behaviour?

I am currently running PostgreSQL 9.6.12 and running queries with pgAdmin 4.0 4.6


Solution

  • After testing this in several different ways I have found out that this is actually a bug in pgAdmin 4.6 I have created a bug on their bug tracker and should hopefully be solve with the next version.