Re: Row pattern recognition
Henson Choi <assam258@gmail.com>
From: Henson Choi <assam258@gmail.com>
To: Tatsuo Ishii <ishii@postgresql.org>
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-25T07:57:01Z
Lists: pgsql-hackers
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.
> 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}.
I'll include this revert in the next patch set.
Best regards,
Choi
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Adjust cross-version upgrade tests for seg_out() fix
- 3e3d7875e956 19 (unreleased) cited
-
Rationalize error comments in partition split/merge tests
- ecb2508aaf9b 19 (unreleased) cited
-
Add fast path for foreign key constraint checks
- 2da86c1ef9b5 19 (unreleased) cited
-
Fix assorted pretty-trivial memory leaks in the backend.
- e78d1d6d47dc 19 (unreleased) cited
-
Add temporal FOREIGN KEY contraints
- 89f908a6d0ac 18.0 cited
-
Add trailing commas to enum definitions
- 611806cd726f 17.0 cited
-
Remove obsolete executor cleanup code
- d060e921ea5a 17.0 cited