Re: default to to ON_ERROR_STOP=on (Re: psql: exit status with multiple -c and -f) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: default to to ON_ERROR_STOP=on (Re: psql: exit status with multiple -c and -f)
Date
Msg-id 1513136.1640626267@sss.pgh.pa.us
Whole thread Raw
In response to default to to ON_ERROR_STOP=on (Re: psql: exit status with multiple -c and -f)  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: default to to ON_ERROR_STOP=on (Re: psql: exit status with multiple -c and -f)
List pgsql-hackers
Justin Pryzby <pryzby@telsasoft.com> writes:
> I think the current behavior of the regression test SQL scripts is exactly the
> opposite of what's desirable for almost all other scripts.  The attached makes
> ON_ERROR_STOP the default, and runs the regression tests with ON_ERROR_STOP=0.

> Is it viable to consider changing this ?

I don't think so.  The number of scripts you will break is far greater
than the number whose behavior will be improved, because people who
wanted this behavior will already be selecting it.  Maybe this wasn't
the greatest choice of default, but it's about twenty years too late
to change it.

I'd also note that I see a fairly direct parallel to "set -e" in
shell scripts, which is likewise not the default.

We could consider documentation changes to make this issue
more visible, perhaps.  Not sure what would be a good place.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Corey Huinker
Date:
Subject: Re: Foreign key joins revisited
Next
From: Tom Lane
Date:
Subject: Re: Inconsistent ellipsis in regression test error message?