From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, David Christensen <david(dot)christensen(at)crunchydata(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCH] add relation and block-level filtering to pg_waldump |
Date: | 2022-03-24 01:06:36 |
Message-ID: | 20220324010636.goeqehteid6tffgj@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2022-03-24 11:54:15 +1300, Thomas Munro wrote:
> Erm, is that really OK? C says "Each enumerated type shall be
> compatible with char, a signed integer type, or an
> unsigned integer type. The choice of type is implementation-defined,
> but shall be capable of representing the values of all the members of
> the enumeration." It could even legally vary from enum to enum,
> though in practice most compilers probably just use ints all the time
> unless you use weird pragma pack incantation. Therefore I think you
> need an intermediate variable with the size and signedness matching the
> format string, if you're going to scanf directly into it, which
> David's V6 did.
/me yearns for the perfectly reasonable C++ 11 feature of defining the base
type for enums (enum name : basetype { }). One of those features C should have
adopted long ago. Not that we could use it yet, given we insist that C
standards have reached at least european drinking age before relying on them.
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2022-03-24 01:15:31 | Re: [PATCH] Add native windows on arm64 support |
Previous Message | Andres Freund | 2022-03-24 00:59:38 | Re: pg_stat_reset_single_*_counters vs pg_stat_database.stats_reset |