On Wed, Nov 19, 2025 at 1:01 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> jian he <jian.universality@gmail.com> writes:
> > [ v1-0001-IS-JSON-predicate-work-with-domain-type.patch ]
>
> This looks like a large patch with a small patch struggling to
> get out of it. Why didn't you simply do
>
> - *exprtype = exprType(expr);
> + *exprtype = getBaseType(exprType(expr));
>
> in transformJsonParseArg?
>
yech.
While at it, I added parser_errposition to the transformJsonIsPredicate ereport.
errmsg("cannot use type %s in IS JSON predicate",
format_type_be(exprtype))
we don't need to worry about exprtype as InvalidOid, because
transformJsonParseArg (exprType(expr)) would fail already in that case.
--
jian
https://www.enterprisedb.com/