aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/regexp.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-08-29 13:55:38 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2022-08-29 13:55:41 -0400
commit7fed801135bae14d63b11ee4a10f6083767046d8 (patch)
tree73fa489ffb169fe62ae066ef5cfe6a39a8fa6163 /src/backend/utils/adt/regexp.c
parent20796536c10fe7869e7af2c69615f14a80555c5d (diff)
downloadpostgresql-7fed801135bae14d63b11ee4a10f6083767046d8.tar.gz
postgresql-7fed801135bae14d63b11ee4a10f6083767046d8.zip
Clean up inconsistent use of fflush().
More than twenty years ago (79fcde48b), we hacked the postmaster to avoid a core-dump on systems that didn't support fflush(NULL). We've mostly, though not completely, hewed to that rule ever since. But such systems are surely gone in the wild, so in the spirit of cleaning out no-longer-needed portability hacks let's get rid of multiple per-file fflush() calls in favor of using fflush(NULL). Also, we were fairly inconsistent about whether to fflush() before popen() and system() calls. While we've received no bug reports about that, it seems likely that at least some of these call sites are at risk of odd behavior, such as error messages appearing in an unexpected order. Rather than expend a lot of brain cells figuring out which places are at hazard, let's just establish a uniform coding rule that we should fflush(NULL) before these calls. A no-op fflush() is surely of trivial cost compared to launching a sub-process via a shell; while if it's not a no-op then we likely need it. Discussion: https://postgr.es/m/2923412.1661722825@sss.pgh.pa.us
Diffstat (limited to 'src/backend/utils/adt/regexp.c')
0 files changed, 0 insertions, 0 deletions