From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: remove some STATUS_* symbols |
Date: | 2020-01-16 12:56:38 |
Message-ID: | CA+TgmobAKj_skqbmeTcG7kXT5hXF1MkCofu5kqrhAm=3ohVh9A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jan 16, 2020 at 12:50 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> Thanks, that looks fine. I am still not sure whether the second patch
> adding an enum via ProcWaitStatus improves the code readability
> though, so my take would be to discard it for now. Perhaps others
> think differently, I don't know.
IMHO, custom enums for each particular case would be a big improvement
over supposedly-generic STATUS codes. It makes it clearer which values
are possible in each code path, and it comes out nicer in the
debugger, too.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Verite | 2020-01-16 13:20:32 | Re: Making psql error out on output failures |
Previous Message | Prabhat Sahu | 2020-01-16 12:55:05 | Re: [HACKERS] Block level parallel vacuum |