Обсуждение: pgsql: Consistently use named parameters in regex code.

Поиск
Список
Период
Сортировка

pgsql: Consistently use named parameters in regex code.

От
Peter Geoghegan
Дата:
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: https://postgr.es/m/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(-)


Re: pgsql: Consistently use named parameters in regex code.

От
Tom Lane
Дата:
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



Re: pgsql: Consistently use named parameters in regex code.

От
Peter Geoghegan
Дата:
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