Re: coalesce(json_agg [..] filter where [..], '[]' in left join returning null - Mailing list pgsql-novice

From David G. Johnston
Subject Re: coalesce(json_agg [..] filter where [..], '[]' in left join returning null
Date
Msg-id CAKFQuwZmevwm7pZdQiz3b5cwF8r0auKHVK8b7cpSmAFhjAWvbA@mail.gmail.com
Whole thread Raw
In response to Re: coalesce(json_agg [..] filter where [..], '[]' in left join returning null  (Stefan Houtzager <stefan.houtzager@gmail.com>)
Responses Re: coalesce(json_agg [..] filter where [..], '[]' in left join returning null  (Stefan Houtzager <stefan.houtzager@gmail.com>)
List pgsql-novice
On Wed, Jan 6, 2021 at 8:59 AM Stefan Houtzager <stefan.houtzager@gmail.com> wrote:

ERROR: operator does not exist: json = json LINE 11: COALESCE(NULLIF( ^ HINT: No operator matches the given name and argument types. You might need to add explicit type casts. SQL state: 42883 Character: 306  


Right, json doesn't implement equality.  You will need to cast to and compare text values.

David J.

pgsql-novice by date:

Previous
From: Pól Ua Laoínecháin
Date:
Subject: Understanding aggregation and window functions.
Next
From: "David G. Johnston"
Date:
Subject: Re: Understanding aggregation and window functions.