From: | John Naylor <john(dot)naylor(at)enterprisedb(dot)com> |
---|---|
To: | Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter(at)eisentraut(dot)org> |
Subject: | Re: [PATCH] Using named captures in Catalog::ParseHeader() |
Date: | 2023-06-13 10:50:10 |
Message-ID: | CAFBsxsEErQtcSsMPS_-JHnbQBf_AN412HFKUT=ydmG9SCMKDvQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jun 1, 2023 at 7:12 PM Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
wrote:
>
> Hi Hackers,
>
> Peter's patch set for autogenerating syscache info
> (https://postgr.es/m/75ae5875-3abc-dafc-8aec-73247ed41cde%40eisentraut.org
)
> touched on one of my least favourite parts of Catalog.pm: the
> parenthesis-counting nightmare that is the parsing of catalog header
> directives.
>
> However, now that we require Perl 5.14, we can use the named capture
> feature (introduced in Perl 5.10) to make that a lot clearer, as in the
> attached patch.
>
> While I was rewriting the regexes I noticed that they were inconsistent
> about whether they accepted whitespace in the parameter lists, so I took
> the liberty to make them consistently allow whitespace after the opening
> paren and the commas, which is what most of them already did.
LGTM
--
John Naylor
EDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2023-06-13 11:07:31 | Re: Making empty Bitmapsets always be NULL |
Previous Message | Alvaro Herrera | 2023-06-13 10:27:56 | Re: [BUG] pg_dump does not properly deal with BEGIN ATOMIC function |