Re: IS JSON predicate support for domain base type as JSON/JSONB/BYTEA/TEXT - Mailing list pgsql-hackers

From Kirill Reshke
Subject Re: IS JSON predicate support for domain base type as JSON/JSONB/BYTEA/TEXT
Date
Msg-id CALdSSPgSLA2sZ7xY7gc-RFR4wbAamO3ORe32SyRsadZTfX+OVg@mail.gmail.com
Whole thread Raw
In response to Re: IS JSON predicate support for domain base type as JSON/JSONB/BYTEA/TEXT  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: IS JSON predicate support for domain base type as JSON/JSONB/BYTEA/TEXT
List pgsql-hackers
On Fri, 13 Mar 2026 at 17:30, Andrew Dunstan <andrew@dunslane.net> wrote:
>
>
> On 2026-03-12 Th 11:55 PM, jian he wrote:
> > Hi.
> >
> > The regression test was very verbose; I removed some of it.
> > Also polished function ExecEvalJsonIsPredicate a little bit.
>
>
>
> Here's a v4. I changed resultBaseType to exprBaseType - I think it's
> clearer. I also trimmed the tests a bit more, and dropped the new
> objects after testing them. The  error message now shows the domain name
> rather than the underlying base type. I think that's more useful.
>


Hi!
V4 looks good. The only thing that I cannot explain is removing the
`exprtype` variable inside ExecEvalJsonIsPredicate. We can just change
its declaration to

exprtype =  pred->exprBaseType if i'm not mistaken?

Anyway, LGTM



> --
> Andrew Dunstan
> EDB: https://www.enterprisedb.com



-- 
Best regards,
Kirill Reshke



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Add a check for interrupts in ginInsert
Next
From: Peter Eisentraut
Date:
Subject: Re: Add --extra-dependencies and immediate data dumping for pg_dump/pg_upgrade