postgresql/src/test/modules
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
..
brin Re-add BRIN isolation test 2015-08-13 14:41:52 -03:00
commit_ts Rework PostgresNode's psql method 2016-03-03 17:58:30 -03:00
dummy_seclabel Update copyright for 2016 2016-01-02 13:33:40 -05:00
test_ddl_deparse Update copyright for 2016 2016-01-02 14:19:48 -05:00
test_extensions Add CASCADE support for CREATE EXTENSION. 2015-10-03 18:23:40 +02:00
test_parser Update copyright for 2016 2016-01-02 13:33:40 -05:00
test_rls_hooks Update copyright for 2016 2016-01-02 14:19:48 -05:00
test_shm_mq Update copyright for 2016 2016-01-02 14:19:48 -05:00
worker_spi Update copyright for 2016 2016-01-02 14:19:48 -05:00
Makefile Add CASCADE support for CREATE EXTENSION. 2015-10-03 18:23:40 +02:00
README Add README in src/test and src/test/modules 2016-02-25 21:08:32 -03:00

README

Test extensions and libraries
=============================

src/test/modules contains PostgreSQL extensions that are primarily or entirely
intended for testing PostgreSQL and/or to serve as example code. The extensions
here aren't intended to be installed in a production server and aren't suitable
for "real work".

Most extensions have their own pg_regress tests or isolationtester specs. Some
are also used by tests elsewhere in the tree.

If you're adding new hooks or other functionality exposed as C-level API this
is where to add the tests for it.