Re: [PATCH] Honor PG_TEST_NOCLEAN for tempdirs

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>, Andrew Dunstan <andrew@dunslane.net>, Jacob Champion <jchampion@timescale.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-06-29T00:40:53Z
Lists: pgsql-hackers
On Wed, Jun 28, 2023 at 10:45:02AM +0200, Peter Eisentraut wrote:
> Right, the usual style is just to check whether an environment variable is
> set to something, not what it is.
> 
> Also note that in general not all environment variables are processed by
> Perl, so I would avoid encoding Perl semantics about what is "true" or
> whatever into it.

Agreed.  I am not sure that this is worth changing to have
boolean-like checks.  Hence, I would also to keep the patch that
checks if the environment variable is defined to enforce the behavior,
without checking for a specific value.
--
Michael

Commits

  1. Make PG_TEST_NOCLEAN work for temporary directories in TAP tests