From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Minor fixes to improve regex debugging code. |
Date: | 2021-02-15 00:54:18 |
Message-ID: | E1lBS9a-0005uL-40@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Minor fixes to improve regex debugging code.
When REG_DEBUG is defined, ensure that an un-filled "struct cnfa"
is all-zeroes, not just that it has nstates == 0. This is mainly
so that looking at "struct subre" structs in gdb doesn't distract
one with a lot of garbage fields during regex compilation.
Adjust some places that print debug output to have suitable fflush
calls afterwards.
In passing, correct an erroneous ancient comment: the concatenation
subre-s created by parsebranch() have op == '.' not ','.
Noted while fooling around with some regex performance improvements.
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/2dd6733108f2bea07b0a3469e768bd900c0808b3
Modified Files
--------------
src/backend/regex/regc_nfa.c | 6 +++---
src/backend/regex/regcomp.c | 5 ++++-
src/include/regex/regguts.h | 8 ++++++++
3 files changed, 15 insertions(+), 4 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2021-02-15 01:25:42 | pgsql: Add result size as argument of pg_cryptohash_final() for overflo |
Previous Message | Thomas Munro | 2021-02-15 00:20:07 | pgsql: ReadNewTransactionId() -> ReadNextTransactionId(). |