At Thu, 16 Jan 2020 14:50:01 +0900, Michael Paquier <mich...@paquier.xyz> wrote in > On Sat, Jan 11, 2020 at 08:14:17AM +0100, Peter Eisentraut wrote: > > OK, pushed as it was then. > > 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.
I feel the same about the second patch. Although actually STATUS_WAITING is used only by ProcSleep and related functions, likewise STATUS_EOF is seen only in auth.c/h. Other files, pqcomm.c, crypt.c postmaster.c, hba.c, fe-auth.c , fe-connect.c, fe-gssapi-common.c are using only STATUS_OK and ERROR. I haven't had a close look but all of the usages would be equivalent to bool. On the other hand many functions in fe-*.c and pqcomm.c returns EOF(-1)/0 instead of STATUS_EOF(-2)/STATUS_OK(0). We could reorganize the values and their usage but it doesn't seem to be a big win.. regards. -- Kyotaro Horiguchi NTT Open Source Software Center