| From: | Tatsuo Ishii <ishii(at)postgresql(dot)org> |
|---|---|
| To: | assam258(at)gmail(dot)com |
| Cc: | vik(at)postgresfriends(dot)org, er(at)xs4all(dot)nl, jacob(dot)champion(at)enterprisedb(dot)com, david(dot)g(dot)johnston(at)gmail(dot)com, peter(at)eisentraut(dot)org, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Row pattern recognition |
| Date: | 2026-02-25 10:16:50 |
| Message-ID: | 20260225.191650.222491732345144005.ishii@postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Daniel Gustafsson | 2026-02-25 10:21:17 | Re: pg_basebackup: removed an unnecessary use of memset in FindStreamingStart |
| Previous Message | Kirill Reshke | 2026-02-25 10:13:10 | Re: amcheck: fix bug of missing corruption in allequalimage validation |