Re: [PATCH] add relation and block-level filtering to pg_waldump - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [PATCH] add relation and block-level filtering to pg_waldump
Date
Msg-id 20220324010636.goeqehteid6tffgj@alap3.anarazel.de
Whole thread Raw
In response to Re: [PATCH] add relation and block-level filtering to pg_waldump  (Thomas Munro <thomas.munro@gmail.com>)
List 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.



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pg_stat_reset_single_*_counters vs pg_stat_database.stats_reset
Next
From: Andres Freund
Date:
Subject: Re: [PATCH] Add native windows on arm64 support