Re: The jsonpath predicate `like_regex` does not accept variables for pattern (or flags) - Mailing list pgsql-bugs

From Tom Lane
Subject Re: The jsonpath predicate `like_regex` does not accept variables for pattern (or flags)
Date
Msg-id 1799749.1722966629@sss.pgh.pa.us
Whole thread Raw
In response to The jsonpath predicate `like_regex` does not accept variables for pattern (or flags)  (sulfinu@gmail.com)
List pgsql-bugs
sulfinu@gmail.com writes:
> I would like to be able to use a variable inside the like_regex predicate,
> at least for the pattern.

This was discussed before [1].  The restriction to a constant pattern
is per SQL spec.  It's not entirely clear to us why the spec is
written that way, but there may be some actual semantic point behind
it.  In any case, if you want to propose a patch, that thread would
probably be the best place to do it.

            regards, tom lane

[1]
https://www.postgresql.org/message-id/flat/CAGHENJ4A8awD2uXHkf50eV%2B9wyiDm3eP%2BG10J09%2B0VRmXBQAdw%40mail.gmail.com



pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: The jsonpath predicate `like_regex` does not accept variables for pattern (or flags)
Next
From: Robert Haas
Date:
Subject: Re: BUG #18545: \dt breaks transaction, calling error when executed in SET SESSION AUTHORIZATION