pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Consistently use named parameters in regex code.
5+ messages / 2 participants
[nested] [flat]
* pgsql: Consistently use named parameters in regex code.
@ 2022-09-19 22:11 Peter Geoghegan <pg@bowt.ie>
2022-09-19 22:18 ` Re: pgsql: Consistently use named parameters in regex code. Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 5+ messages in thread
From: Peter Geoghegan @ 2022-09-19 22:11 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
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(-)
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Consistently use named parameters in regex code.
2022-09-19 22:11 pgsql: Consistently use named parameters in regex code. Peter Geoghegan <pg@bowt.ie>
@ 2022-09-19 22:18 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-09-19 22:22 ` Re: pgsql: Consistently use named parameters in regex code. Peter Geoghegan <pg@bowt.ie>
0 siblings, 1 reply; 5+ messages in thread
From: Tom Lane @ 2022-09-19 22:18 UTC (permalink / raw)
To: Peter Geoghegan <pg@bowt.ie>; +Cc: pgsql-committers@lists.postgresql.org
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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Consistently use named parameters in regex code.
2022-09-19 22:11 pgsql: Consistently use named parameters in regex code. Peter Geoghegan <pg@bowt.ie>
2022-09-19 22:18 ` Re: pgsql: Consistently use named parameters in regex code. Tom Lane <tgl@sss.pgh.pa.us>
@ 2022-09-19 22:22 ` Peter Geoghegan <pg@bowt.ie>
0 siblings, 0 replies; 5+ messages in thread
From: Peter Geoghegan @ 2022-09-19 22:22 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers@lists.postgresql.org
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
^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Consistently use named parameters in timezone code.
@ 2022-09-19 22:15 Peter Geoghegan <pg@bowt.ie>
0 siblings, 0 replies; 5+ messages in thread
From: Peter Geoghegan @ 2022-09-19 22:15 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Consistently use named parameters in timezone code.
Make our copy of the IANA timezone library use named parameters in
function declarations. Also make sure that parameter names from each
function's declaration match corresponding definition parameter names.
This makes the timezone code follow Postgres coding standards. The
value of having a consistent standard everywhere seems to outweigh the
cost of keeping the function declarations in sync with future IANA
releases.
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/c4f8e89fef3d4cd8b0791637667fd984d6f38fb2
Modified Files
--------------
src/timezone/localtime.c | 16 +++++++++-------
src/timezone/pgtz.c | 8 ++++----
src/timezone/strftime.c | 10 +++++-----
src/timezone/zic.c | 34 ++++++++++++++++++----------------
4 files changed, 36 insertions(+), 32 deletions(-)
^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Consistently use named parameters in regex code consistently.
@ 2022-09-19 22:48 Peter Geoghegan <pg@bowt.ie>
0 siblings, 0 replies; 5+ messages in thread
From: Peter Geoghegan @ 2022-09-19 22:48 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Consistently use named parameters in regex code consistently.
Adjust a handful of remaining function prototypes that were overlooked
by recent commit bc2187ed. This oversight wasn't caught by clang-tidy
because the functions in question are only built in custom REG_DEBUG
builds.
Author: Peter Geoghegan <pg@bowt.ie>
Reported-By: Tom Lane <tgl@sss.pgh.pa.us>
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/cb8ff7ed5ac907a4a574413f3e46a3522d7b164c
Modified Files
--------------
src/backend/regex/regcomp.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2022-09-19 22:48 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-09-19 22:11 pgsql: Consistently use named parameters in regex code. Peter Geoghegan <pg@bowt.ie>
2022-09-19 22:18 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-09-19 22:22 ` Peter Geoghegan <pg@bowt.ie>
2022-09-19 22:15 pgsql: Consistently use named parameters in timezone code. Peter Geoghegan <pg@bowt.ie>
2022-09-19 22:48 pgsql: Consistently use named parameters in regex code consistently. Peter Geoghegan <pg@bowt.ie>
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