From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Peter Smith <smithpb2250@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: static assert cleanup
Date: Wed, 14 Dec 2022 16:15:14 +0100
Message-ID: <7d41d99f-25ac-7673-9b4b-7601db7c1ddb@enterprisedb.com> (raw)
In-Reply-To: <CAHut+PsUDMySVRuRc=h+P5N3+=TGvj4W_mi32XXg9dt4o-BXbA@mail.gmail.com>
References: <941a04e7-dd6f-c0e4-8cdf-a33b3338cbda@enterprisedb.com>
<CAHut+PsUDMySVRuRc=h+P5N3+=TGvj4W_mi32XXg9dt4o-BXbA@mail.gmail.com>
On 11.12.22 23:18, Peter Smith wrote:
> +StaticAssertDecl(SysCacheSize == (int) lengthof(cacheinfo),
> + "SysCacheSize does not match syscache.c's array");
> +
> static CatCache *SysCache[SysCacheSize];
>
> In almost every example I found of StaticAssertXXX, the lengthof(arr)
> part came first in the condition. Since you are modifying this anyway,
> should this one also be reversed for consistency?
Makes sense. I have pushed this separately.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: peter.eisentraut@enterprisedb.com, smithpb2250@gmail.com
Subject: Re: static assert cleanup
In-Reply-To: <7d41d99f-25ac-7673-9b4b-7601db7c1ddb@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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