Andres Freund <andres@anarazel.de> writes:
> On 2020-03-02 17:52:17 -0500, Tom Lane wrote:
>> While looking at Tomas' ALTER TYPE patch, I got annoyed by the fact
>> that all of the backend writes constants of type alignment and type
>> storage values as literal characters, such as 'i' and 'x'. This is
>> not our style for most other "poor man's enum" catalog columns, and
>> it makes it really hard to grep for relevant code. Hence, attached
>> is a proposed patch to invent #define names for those values.
> Independent of the patch, why aren't we using proper enums for some of
> these?
I did think about that, but since the underlying storage needs to be
a "char", I'm not sure that using an enum for the values would really
be all that helpful. We might get warnings from pickier compilers,
and we wouldn't necessarily get the warnings we actually want.
regards, tom lane