postgresql/src/bin/scripts
Alvaro Herrera 2c83f435a3 Rework PostgresNode's psql method
This makes the psql() method much more capable: it captures both stdout
and stderr; it now returns the psql exit code rather than stdout; a
timeout can now be specified, as can ON_ERROR_STOP behavior; it gained a
new "on_error_die" (defaulting to off) parameter to raise an exception
if there's any problem.  Finally, additional parameters to psql can be
passed if there's need for further tweaking.

For convenience, a new safe_psql() method retains much of the old
behavior of psql(), except that it uses on_error_die on, so that
problems like syntax errors in SQL commands can be detected more easily.

Many existing TAP test files now use safe_psql, which is what is really
wanted.  A couple of ->psql() calls are now added in the commit_ts
tests, which verify that the right thing is happening on certain errors.
Some ->command_fails() calls in recovery tests that were verifying that
psql failed also became ->psql() calls now.

Author: Craig Ringer. Some tweaks by Álvaro Herrera
Reviewed-By: Michaël Paquier
2016-03-03 17:58:30 -03:00
..
po Translation updates 2015-06-28 23:56:55 -04:00
t Rework PostgresNode's psql method 2016-03-03 17:58:30 -03:00
.gitignore Add TAP tests for client programs 2014-04-14 21:33:46 -04:00
clusterdb.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
common.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
common.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
createdb.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
createlang.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
createuser.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
dropdb.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
droplang.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
dropuser.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
Makefile Update copyright for 2016 2016-01-02 13:33:40 -05:00
nls.mk Translation updates 2014-12-15 00:25:35 -05:00
pg_isready.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
reindexdb.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
vacuumdb.c Update copyright for 2016 2016-01-02 13:33:40 -05:00