Re: lwlocknames.h beautification attempt

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Gurjeet Singh <gurjeet@singh.im>
Cc: Postgres Hackers <pgsql-hackers@postgresql.org>
Date: 2025-03-03T16:40:39Z
Lists: pgsql-hackers
On Sun, Mar 2, 2025 at 1:10 AM Gurjeet Singh <gurjeet@singh.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



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Make lwlocknames.h generated file less ugly