pgsql: Consistently use named parameters in regex code.

Started by Peter Geogheganalmost 4 years ago3 messagescomitters
Jump to latest

Consistently use named parameters in regex code.

Make regex code consistently use named parameters in function
declarations. Also make sure that parameter names from each function's
declaration match corresponding definition parameter names.

This makes Henry Spencer's regex code follow Postgres coding standards.

Author: Peter Geoghegan <pg@bowt.ie>
Reviewed-By: David Rowley <dgrowleyml@gmail.com>
Discussion: /messages/by-id/CAH2-WznJt9CMM9KJTMjJh_zbL5hD9oX44qdJ4aqZtjFi-zA3Tg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/bc2187ed63c56bb9cd99f6613f3e2ba56afb22fe

Modified Files
--------------
src/backend/regex/regcomp.c | 342 +++++++++++++++++--------------
src/backend/regex/regexec.c | 65 +++---
src/backend/utils/adt/regexp.c | 2 +-
src/include/regex/regex.h | 14 +-
src/test/modules/test_regex/test_regex.c | 2 +-
5 files changed, 241 insertions(+), 184 deletions(-)

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Geoghegan (#1)
Re: pgsql: Consistently use named parameters in regex code.

Peter Geoghegan <pg@bowt.ie> writes:

Consistently use named parameters in regex code.

Just scanning this quickly, it looks like you missed the ones
hidden behind #ifdef REG_DEBUG, eg dumpstate().

regards, tom lane

In reply to: Tom Lane (#2)
Re: pgsql: Consistently use named parameters in regex code.

On Mon, Sep 19, 2022 at 3:18 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

Just scanning this quickly, it looks like you missed the ones
hidden behind #ifdef REG_DEBUG, eg dumpstate().

Ugh, yeah. I did manage to catch some of them -- but not all of them.

Will address this with a follow-up commit shortly.

--
Peter Geoghegan