Re: Row pattern recognition

Tatsuo Ishii <ishii@postgresql.org>

From: Tatsuo Ishii <ishii@postgresql.org>
To: assam258@gmail.com
Cc: vik@postgresfriends.org, er@xs4all.nl, jacob.champion@enterprisedb.com, david.g.johnston@gmail.com, peter@eisentraut.org, pgsql-hackers@postgresql.org
Date: 2026-02-25T10:16:50Z
Lists: pgsql-hackers
Hi Henson,

> Hi Tatsuo,
> 
> I recently purchased the ISO/IEC 19075-5:2021 standard document
> through my company, and have started cross-referencing it against
> the implementation.
> 
>> nocfbot-0005: Detect zero-consumption NFA cycles
> 
> 
> The cycle detection itself is necessary, but I found a behavioral
> difference from the standard (Section 7.2.8).
> 
> When a group body is nullable (e.g. A? in (A?){2,3}), the visited
> bitmap blocks re-entry to the skipped variable, so the END element
> never gets a chance to produce an exit state for count < min.
> The standard/Perl allows empty iterations to count toward min.
> 
> I plan to fix this by adding a compile-time flag on END elements
> that indicates the group body can iterate with empty matches.
> When the flag is set, nfa_advance_end() will generate the exit
> state even when count < min.

Ok.

>> nocfbot-0006: Allow A{0} quantifier
>>
> 
> After reviewing the standard, I'd like to withdraw this patch.
> 
> Section 4.14.1 explicitly requires n > 0 for the {n} quantifier.
> While A{0} works correctly as an epsilon transition with the cycle
> detection in place, it violates the standard.
> 
> Since we aim for standard conformance, I think we should keep the
> n >= 1 restriction for {n}.

This is my bad. I didn't realize the standard prohibits A{0} even I
have the standard document.

> I'll include this revert in the next patch set.

Thanks!
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Adjust cross-version upgrade tests for seg_out() fix

  2. Rationalize error comments in partition split/merge tests

  3. Add fast path for foreign key constraint checks

  4. Fix assorted pretty-trivial memory leaks in the backend.

  5. Add temporal FOREIGN KEY contraints

  6. Add trailing commas to enum definitions

  7. Remove obsolete executor cleanup code