Re: lwlocknames.h beautification attempt

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Gurjeet Singh <gurjeet(at)singh(dot)im>
Cc: Postgres Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: lwlocknames.h beautification attempt
Date: 2025-03-03 16:40:39
Message-ID: CA+TgmoY=2+grzbpQGZbPe0oJHnb3-B3TDJvLZiJubBH3Czo4Og@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Mar 2, 2025 at 1:10 AM Gurjeet Singh <gurjeet(at)singh(dot)im> wrote:
> I propose the following change to the generation script, generate-lwlocknames.pl
>
> - print $h "#define ${lockname}Lock (&MainLWLockArray[$lockidx].lock)\n";
> + printf $h "#define %-30s %s\n", "${lockname}Lock", "(&MainLWLockArray[$lockidx].lock)";

-1. That seems worse to me.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2025-03-03 16:48:20 Re: Flaky 003_start_stop.pl test
Previous Message Robert Haas 2025-03-03 16:38:01 Re: making EXPLAIN extensible