postgresql/src/test/regress
Tom Lane 7ca37fb040 Use setenv() in preference to putenv().
Since at least 2001 we've used putenv() and avoided setenv(), on the
grounds that the latter was unportable and not in POSIX.  However,
POSIX added it that same year, and by now the situation has reversed:
setenv() is probably more portable than putenv(), since POSIX now
treats the latter as not being a core function.  And setenv() has
cleaner semantics too.  So, let's reverse that old policy.

This commit adds a simple src/port/ implementation of setenv() for
any stragglers (we have one in the buildfarm, but I'd not be surprised
if that code is never used in the field).  More importantly, extend
win32env.c to also support setenv().  Then, replace usages of putenv()
with setenv(), and get rid of some ad-hoc implementations of setenv()
wannabees.

Also, adjust our src/port/ implementation of unsetenv() to follow the
POSIX spec that it returns an error indicator, rather than returning
void as per the ancient BSD convention.  I don't feel a need to make
all the call sites check for errors, but the portability stub ought
to match real-world practice.

Discussion: https://postgr.es/m/2065122.1609212051@sss.pgh.pa.us
2020-12-30 12:56:06 -05:00
..
data Fix full text search to handle NOT above a phrase search correctly. 2020-04-27 12:21:04 -04:00
expected Fix selectivity estimation @> (anymultirange, anyrange) operator 2020-12-30 20:31:15 +03:00
input Clean up ancient test style 2020-12-15 22:03:39 +01:00
output Clean up ancient test style 2020-12-15 22:03:39 +01:00
sql Fix selectivity estimation @> (anymultirange, anyrange) operator 2020-12-30 20:31:15 +03:00
.gitignore Fix inconsistencies and typos in the tree, take 10 2019-08-13 13:53:41 +09:00
GNUmakefile Make install-tests target work with vpath builds 2020-05-31 18:33:00 -04:00
Makefile
parallel_schedule Multirange datatypes 2020-12-20 07:20:33 +03:00
pg_regress_main.c Use setenv() in preference to putenv(). 2020-12-30 12:56:06 -05:00
pg_regress.c Use setenv() in preference to putenv(). 2020-12-30 12:56:06 -05:00
pg_regress.h Remove arbitrary line length limits in pg_regress (plain and ECPG). 2020-09-06 14:13:19 -04:00
README
regress.c Use setenv() in preference to putenv(). 2020-12-30 12:56:06 -05:00
regressplans.sh Fix inconsistencies in the code 2019-07-08 13:15:09 +09:00
resultmap
serial_schedule Multirange datatypes 2020-12-20 07:20:33 +03:00
standby_schedule

Documentation concerning how to run these regression tests and interpret
the results can be found in the PostgreSQL manual, in the chapter
"Regression Tests".