Re: coalesce(json_agg [..] filter where [..], '[]' in left join returning null

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Stefan Houtzager <stefan(dot)houtzager(at)gmail(dot)com>
Cc: pgsql-novice <pgsql-novice(at)lists(dot)postgresql(dot)org>
Subject: Re: coalesce(json_agg [..] filter where [..], '[]' in left join returning null
Date: 2021-01-06 16:10:30
Message-ID: CAKFQuwZmevwm7pZdQiz3b5cwF8r0auKHVK8b7cpSmAFhjAWvbA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Wed, Jan 6, 2021 at 8:59 AM Stefan Houtzager <stefan(dot)houtzager(at)gmail(dot)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.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message David G. Johnston 2021-01-06 16:25:41 Re: Understanding aggregation and window functions.
Previous Message Pól Ua Laoínecháin 2021-01-06 16:07:22 Understanding aggregation and window functions.