Re: IS JSON predicate support for domain base type as JSON/JSONB/BYTEA/TEXT

Andrew Dunstan <andrew@dunslane.net>

From: Andrew Dunstan <andrew@dunslane.net>
To: jian he <jian.universality@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2026-03-13T12:30:27Z
Lists: pgsql-hackers

Attachments

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.


cheers


andrew


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

Commits

  1. Allow IS JSON predicate to work with domain types

  2. SQL/JSON: support the IS JSON predicate