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

From Peter Eisentraut
Subject Re: remove some STATUS_* symbols
Date
Msg-id 3a4550d0-e899-b477-fd43-0745d18a4fc1@2ndquadrant.com
Whole thread Raw
In response to Re: remove some STATUS_* symbols  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: remove some STATUS_* symbols  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On 2020-01-16 13:56, Robert Haas wrote:
> 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.

Given this feedback, I would like to re-propose the original patch, 
attached again here.

After this, the use of the remaining STATUS_* symbols will be contained 
to the frontend and backend libpq code, so it'll be more coherent.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Ranier Vilela
Date:
Subject: Re: Windows regress fails (latest HEAD)
Next
From: Li Japin
Date:
Subject: Re: Terminate the idle sessions