From: Tom Lane <tgl@sss.pgh.pa.us>
To: sulfinu@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: The jsonpath predicate `like_regex` does not accept variables for pattern (or flags)
Date: Tue, 06 Aug 2024 13:50:29 -0400
Message-ID: <1799749.1722966629@sss.pgh.pa.us> (raw)
In-Reply-To: <CAGH1kmz2QT+m2Lr8ts=YWDq+435JWZ2MPFE2WpS2yFh2HQrQ5g@mail.gmail.com>
References: <CAGH1kmz2QT+m2Lr8ts=YWDq+435JWZ2MPFE2WpS2yFh2HQrQ5g@mail.gmail.com>
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...
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, sulfinu@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: The jsonpath predicate `like_regex` does not accept variables for pattern (or flags)
In-Reply-To: <1799749.1722966629@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox