Re: remove some STATUS_* symbols - Mailing list pgsql-hackers

From Robert Haas
Subject Re: remove some STATUS_* symbols
Date
Msg-id CA+TgmobAKj_skqbmeTcG7kXT5hXF1MkCofu5kqrhAm=3ohVh9A@mail.gmail.com
Whole thread Raw
In response to Re: remove some STATUS_* symbols  (Michael Paquier <michael@paquier.xyz>)
Responses Re: remove some STATUS_* symbols  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On Thu, Jan 16, 2020 at 12:50 AM Michael Paquier <michael@paquier.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



pgsql-hackers by date:

Previous
From: Prabhat Sahu
Date:
Subject: Re: [HACKERS] Block level parallel vacuum
Next
From: "Daniel Verite"
Date:
Subject: Re: Making psql error out on output failures