From: Vik Fearing <vik@postgresfriends.org>
To: Tatsuo Ishii <ishii@sraoss.co.jp>
To: jchampion@timescale.com
Cc: er@xs4all.nl
Cc: pgsql-hackers@postgresql.org
Subject: Re: Row pattern recognition
Date: Sat, 9 Sep 2023 15:32:41 +0200
Message-ID: <b3c40fdd-f5ee-682d-53fd-8593fd65c80f@postgresfriends.org> (raw)
In-Reply-To: <20230909.202121.983745512339833395.t-ishii@sranhm.sra.co.jp>
References: <fcf6dcfa-5a61-00ea-4311-d3d003b790ed@timescale.com>
<20230908.125447.478562939918621603.t-ishii@sranhm.sra.co.jp>
<96b4d3c8-1415-04db-5629-d2617ac7a156@timescale.com>
<20230909.202121.983745512339833395.t-ishii@sranhm.sra.co.jp>
On 9/9/23 13:21, Tatsuo Ishii wrote:
> Thanks for the explanation. Surprising concet of the standard:-)
<quote from 19075-5:2023>
This leaves the choice between traditional NFA and Posix NFA. The
difference between these is that a traditional NFA exits (declares a
match) as soon as it finds the first possible match, whereas a Posix NFA
is obliged to find all possible matches and then choose the “leftmost
longest”. There are examples that show that, even for conventional
regular expression matching on text strings and without back references,
there are patterns for which a Posix NFA is orders of magnitude slower
than a traditional NFA. In addition, reluctant quantifiers cannot be
defined in a Posix NFA, because of the leftmost longest rule.
Therefore it was decided not to use the Posix NFA model, which leaves
the traditional NFA as the model for row pattern matching. Among
available tools that use traditional NFA engines, Perl is the most
influential; therefore Perl was adopted as the design target for pattern
matching rules.
</quote>
> Is it different from SIMILAR TO REs too?
Of course it is. :-) SIMILAR TO uses its own language and rules.
> What if we don't follow the standard, instead we follow POSIX EREs? I
> think this is better for users unless RPR's REs has significant merit
> for users.
This would get big pushback from me.
--
Vik Fearing
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-hackers@postgresql.org
Cc: vik@postgresfriends.org, ishii@sraoss.co.jp, jchampion@timescale.com, er@xs4all.nl
Subject: Re: Row pattern recognition
In-Reply-To: <b3c40fdd-f5ee-682d-53fd-8593fd65c80f@postgresfriends.org>
* 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