From: | Peter Smith <smithpb2250(at)gmail(dot)com> |
---|---|
To: | Zhihong Yu <zyu(at)yugabyte(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: name of enum used in 'Cache if PathTarget and RestrictInfos contain volatile functions' |
Date: | 2021-03-29 05:16:40 |
Message-ID: | CAHut+Puvo8ZLSUa2dnqOND3T_SGZnvWVToMB+wZNPRnbLi3gPA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Mar 29, 2021 at 1:15 PM Zhihong Yu <zyu(at)yugabyte(dot)com> wrote:
>
> Hi,
> I was looking at:
> Cache if PathTarget and RestrictInfos contain volatile functions
>
> VOLATILITY_NOVOLATILE caught my attention. Since the enum values don't start with HAS, I think VOLATILITY_NONVOLATILE would be easier to read.
> Actually I think since the enums are defined in VolatileFunctionStatus, they can be simply called (the prefix should be redundant):
>
> UNKNOWN
> NONVOLATILE
> VOLATILE
>
Although it seems like a good idea to remove prefixes, a name as
common as UNKNOWN is going to clash [1] with something else, which
IIUC is why the enums all have prefixes in the first place.
------
[1] https://stackoverflow.com/questions/35380279/avoid-name-collisions-with-enum-in-c-c99
Kind Regards,
Peter Smith.
Fujitsu Australia
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2021-03-29 05:47:33 | Re: Walsender may fail to send wal to the end. |
Previous Message | Michael Paquier | 2021-03-29 05:00:20 | Re: invalid data in file backup_label problem on windows |