Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rg5xq-0049WN-Pa for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Mar 2024 16:42:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rg5xp-00E6ba-DF for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Mar 2024 16:42:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rg5xp-00E6bS-3J for pgsql-hackers@lists.postgresql.org; Fri, 01 Mar 2024 16:42:25 +0000 Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rg5xl-002Lw9-BQ for pgsql-hackers@lists.postgresql.org; Fri, 01 Mar 2024 16:42:23 +0000 Received: by mail-ot1-x332.google.com with SMTP id 46e09a7af769-6dc8b280155so1752795a34.0 for ; Fri, 01 Mar 2024 08:42:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=neon.tech; s=google; t=1709311341; x=1709916141; darn=lists.postgresql.org; h=in-reply-to:references:to:subject:cc:from:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Q99tpMlyxRl1LxGXciDC+zt/ucgkWtrwdjbRl/2NA5w=; b=HJo0APCM/mJ/A/T24xvOrSWY/ir9+PejoEUl/SZowpHsEbEZToVizi5jHztZoDkM6A 2QqOmPeRw6TheQd8qqd4dVjVIx1EDth7AmyuR6K8FFSyCpD04Zi5x1SDkDJWuvhijCqE Otcg/wQ2kZVJ1jYmKK19+g8pR6p7800JUsIis= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709311341; x=1709916141; h=in-reply-to:references:to:subject:cc:from:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Q99tpMlyxRl1LxGXciDC+zt/ucgkWtrwdjbRl/2NA5w=; b=TWfj3KADMvjBPKCeYWc1ndh4cHBRyJdvFYkmlHT2Ymv7bUt1Nkk4rGskqD2rgV6BYO YJh3VbBN7HLjtoQDZGCa/JIDUKBSM6z//ETGkt8D06CiuuPCRMDQSjdgokqKuUB6s0oo jHcNxJYWUQuEdOoBEZKHg7g2iPgUE9HN6gEW2FZCItWT1f2FAVcdly8ue4t1U4SxSxKw mAq0NKXPgC+nFDb/+RCt6mLIL2Ipz8U+MGRvppF/IX8xlqt/VaEv9TiUiG1c5VG+cFut YB4PFBj8bwo6VzrZmsGgTjoK1XLFusc6rB3lwiclX8yjHAMeFMGWv9hr7Zxb4WPx4Irq 61Lw== X-Gm-Message-State: AOJu0YxQDX7gbtQDP9VohlR57r10IBdOffgrcQAlMe+t2nxxEXdS73cp 0iP8Y6QISguvgAotiVIsIIOrbQz2XlbmpT+OkjvQ3mKG7G4uvdIymfFt05jUlMSUXGwjy6HMHuk dzJU= X-Google-Smtp-Source: AGHT+IHpvv3Jkdwg/LGk5rmu1xrC2PCGK+qsHSnVSjhrd8DI5ih/HYJ+HwdK7CE+XYravjgjcnAH4g== X-Received: by 2002:a05:6830:6509:b0:6e4:a2ab:ccfd with SMTP id cm9-20020a056830650900b006e4a2abccfdmr3184491otb.18.1709311341243; Fri, 01 Mar 2024 08:42:21 -0800 (PST) Received: from localhost ([2607:fb90:f223:b37:3996:e070:71ee:42fb]) by smtp.gmail.com with ESMTPSA id z9-20020a9d7a49000000b006e4b6013ab2sm746069otm.15.2024.03.01.08.42.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Mar 2024 08:42:20 -0800 (PST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; format=Flowed Date: Fri, 01 Mar 2024 10:42:19 -0600 Message-Id: From: "Tristan Partin" Cc: "Pg Hackers" Subject: Re: make BuiltinTrancheNames less ugly To: "Alvaro Herrera" , "Heikki Linnakangas" X-Mailer: aerc 0.17.0-67-g66bbc5303578 References: <7f638c9c-8a15-4deb-a3a5-c1a445762fcd@iki.fi> <202403011400.znd4wzeofwnp@alvherre.pgsql> In-Reply-To: <202403011400.znd4wzeofwnp@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri Mar 1, 2024 at 8:00 AM CST, Alvaro Herrera wrote: > On 2024-Feb-23, Heikki Linnakangas wrote: > > > On 12/02/2024 19:01, Tristan Partin wrote: > > > On Wed Jan 24, 2024 at 8:09 AM CST, Alvaro Herrera wrote: > > > > IMO it would be less ugly to have the origin file lwlocknames.txt b= e > > > > not a text file but a .h with a macro that can be defined by > > > > interested parties so that they can extract what they want from the > > > > file, like PG_CMDTAG or PG_KEYWORD. Using Perl for this seems dirt= y... > > >=20 > > > I really like this idea, and would definitely be more inclined to see > > > a solution like this. > >=20 > > +1 to that idea from me too. Seems pretty straightforward. > > OK, here's a patch that does it. I have not touched Meson yet. > > I'm pretty disappointed of not being able to remove > generate-lwlocknames.pl (it now generates the .h, no longer the .c > file), but I can't find a way to do the equivalent #defines in CPP ... > it'd require invoking the C preprocessor twice. Maybe an intermediate > .h file would solve the problem, but I have no idea how would that work > with Meson. I guess I'll do it in Make and let somebody suggest a Meson > way. I can help you with Meson if you get the Make implementation done. --=20 Tristan Partin Neon (https://neon.tech)