| From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: remove some STATUS_* symbols |
| Date: | 2020-06-11 13:55:59 |
| Message-ID: | 3a4550d0-e899-b477-fd43-0745d18a4fc1@2ndquadrant.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 2020-01-16 13:56, Robert Haas wrote:
> 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.
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 | Content-Type | Size |
|---|---|---|
| v2-0001-Remove-STATUS_WAITING.patch | text/plain | 12.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Li Japin | 2020-06-11 13:57:24 | Re: Terminate the idle sessions |
| Previous Message | Ranier Vilela | 2020-06-11 13:40:09 | Re: Windows regress fails (latest HEAD) |