pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Minor fixes to improve regex debugging code.
Date: Mon, 15 Feb 2021 00:54:18 +0000
Message-ID: <E1lBS9a-0005uL-40@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1lBS9a-0005uL-40@gemulon.postgresql.org>
Permalink:  ../E1lBS9a-0005uL-40@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lBS9a-0005uL-40@gemulon.postgresql.org

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Minor fixes to improve regex debugging code.
  In-Reply-To: <E1lBS9a-0005uL-40@gemulon.postgresql.org>
  References: <E1lBS9a-0005uL-40@gemulon.postgresql.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