diff --git a/src/bin/psql/t/001_basic.pl b/src/bin/psql/t/001_basic.pl index 3961e69e1cc..bbd330216ae 100644 --- a/src/bin/psql/t/001_basic.pl +++ b/src/bin/psql/t/001_basic.pl @@ -452,6 +452,8 @@ psql_fails_like( '\set WATCH_INTERVAL 1e500', qr/is out of range/, 'WATCH_INTERVAL variable is out of range'); +psql_like($node, '\echo :WATCH_INTERVAL', + qr/^2$/m, 'WATCH_INTERVAL variable was not altered'); # Test \g output piped into a program. # The program is perl -pe '' to simply copy the input to the output. diff --git a/src/bin/psql/variables.c b/src/bin/psql/variables.c index f2a28bc9820..8060f2959cc 100644 --- a/src/bin/psql/variables.c +++ b/src/bin/psql/variables.c @@ -224,6 +224,7 @@ ParseVariableDouble(const char *value, const char *name, double *result, double if (name) pg_log_error("invalid value \"%s\" for variable \"%s\": must be less than %.2f", value, name, max); + return false; } *result = dblval; return true;