]> granicus.if.org Git - postgresql/commit
Establish conventions about global object names used in regression tests.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 17 Jul 2016 22:42:31 +0000 (18:42 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 17 Jul 2016 22:42:43 +0000 (18:42 -0400)
commit18555b1323bd225c7882e80723c52f25ce60afed
tree6913712a47c4bd2de14b86b2366c6eb728a109c0
parent7482fc4600ee97f8b2570e87b8c216a83b918065
Establish conventions about global object names used in regression tests.

To ensure that "make installcheck" can be used safely against an existing
installation, we need to be careful about what global object names
(database, role, and tablespace names) we use; otherwise we might
accidentally clobber important objects.  There's been a weak consensus that
test databases should have names including "regression", and that test role
names should start with "regress_", but we didn't have any particular rule
about tablespace names; and neither of the other rules was followed with
any consistency either.

This commit moves us a long way towards having a hard-and-fast rule that
regression test databases must have names including "regression", and that
test role and tablespace names must start with "regress_".  It's not
completely there because I did not touch some test cases in rolenames.sql
that test creation of special role names like "session_user".  That will
require some rethinking of exactly what we want to test, whereas the intent
of this patch is just to hit all the cases in which the needed renamings
are cosmetic.

There is no enforcement mechanism in this patch either, but if we don't
add one we can expect that the tests will soon be violating the convention
again.  Again, that's not such a cosmetic change and it will require
discussion.  (But I did use a quick-hack enforcement patch to find these
cases.)

Discussion: <16638.1468620817@sss.pgh.pa.us>
173 files changed:
contrib/dblink/expected/dblink.out
contrib/dblink/sql/dblink.sql
contrib/file_fdw/input/file_fdw.source
contrib/file_fdw/output/file_fdw.source
contrib/sepgsql/expected/alter.out
contrib/sepgsql/expected/ddl.out
contrib/sepgsql/sql/alter.sql
contrib/sepgsql/sql/ddl.sql
contrib/test_decoding/expected/permissions.out
contrib/test_decoding/sql/permissions.sql
doc/src/sgml/dblink.sgml
doc/src/sgml/regress.sgml
src/bin/pg_dump/t/002_pg_dump.pl
src/bin/scripts/t/040_createuser.pl
src/bin/scripts/t/070_dropuser.pl
src/interfaces/ecpg/test/Makefile
src/interfaces/ecpg/test/compat_informix/test_informix2.pgc
src/interfaces/ecpg/test/connect/test1.pgc
src/interfaces/ecpg/test/connect/test2.pgc
src/interfaces/ecpg/test/connect/test3.pgc
src/interfaces/ecpg/test/connect/test5.pgc
src/interfaces/ecpg/test/expected/compat_informix-describe.c
src/interfaces/ecpg/test/expected/compat_informix-describe.stderr
src/interfaces/ecpg/test/expected/compat_informix-rnull.c
src/interfaces/ecpg/test/expected/compat_informix-rnull.stderr
src/interfaces/ecpg/test/expected/compat_informix-sqlda.c
src/interfaces/ecpg/test/expected/compat_informix-sqlda.stderr
src/interfaces/ecpg/test/expected/compat_informix-test_informix.c
src/interfaces/ecpg/test/expected/compat_informix-test_informix.stderr
src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c
src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stderr
src/interfaces/ecpg/test/expected/connect-test1-minGW32.stderr
src/interfaces/ecpg/test/expected/connect-test1.c
src/interfaces/ecpg/test/expected/connect-test1.stderr
src/interfaces/ecpg/test/expected/connect-test2.c
src/interfaces/ecpg/test/expected/connect-test2.stderr
src/interfaces/ecpg/test/expected/connect-test3.c
src/interfaces/ecpg/test/expected/connect-test3.stderr
src/interfaces/ecpg/test/expected/connect-test4.c
src/interfaces/ecpg/test/expected/connect-test4.stderr
src/interfaces/ecpg/test/expected/connect-test5.c
src/interfaces/ecpg/test/expected/connect-test5.stderr
src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c
src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stderr
src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c
src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stderr
src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c
src/interfaces/ecpg/test/expected/pgtypeslib-num_test.stderr
src/interfaces/ecpg/test/expected/preproc-array_of_struct.c
src/interfaces/ecpg/test/expected/preproc-array_of_struct.stderr
src/interfaces/ecpg/test/expected/preproc-autoprep.c
src/interfaces/ecpg/test/expected/preproc-autoprep.stderr
src/interfaces/ecpg/test/expected/preproc-comment.c
src/interfaces/ecpg/test/expected/preproc-comment.stderr
src/interfaces/ecpg/test/expected/preproc-cursor.c
src/interfaces/ecpg/test/expected/preproc-cursor.stderr
src/interfaces/ecpg/test/expected/preproc-define.c
src/interfaces/ecpg/test/expected/preproc-define.stderr
src/interfaces/ecpg/test/expected/preproc-describe.c
src/interfaces/ecpg/test/expected/preproc-describe.stderr
src/interfaces/ecpg/test/expected/preproc-outofscope.c
src/interfaces/ecpg/test/expected/preproc-outofscope.stderr
src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.c
src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.stderr
src/interfaces/ecpg/test/expected/preproc-strings.c
src/interfaces/ecpg/test/expected/preproc-strings.stderr
src/interfaces/ecpg/test/expected/preproc-type.c
src/interfaces/ecpg/test/expected/preproc-type.stderr
src/interfaces/ecpg/test/expected/preproc-variable.c
src/interfaces/ecpg/test/expected/preproc-variable.stderr
src/interfaces/ecpg/test/expected/preproc-whenever.c
src/interfaces/ecpg/test/expected/preproc-whenever.stderr
src/interfaces/ecpg/test/expected/sql-array.c
src/interfaces/ecpg/test/expected/sql-array.stderr
src/interfaces/ecpg/test/expected/sql-binary.c
src/interfaces/ecpg/test/expected/sql-binary.stderr
src/interfaces/ecpg/test/expected/sql-code100.c
src/interfaces/ecpg/test/expected/sql-code100.stderr
src/interfaces/ecpg/test/expected/sql-copystdout.c
src/interfaces/ecpg/test/expected/sql-copystdout.stderr
src/interfaces/ecpg/test/expected/sql-define.c
src/interfaces/ecpg/test/expected/sql-define.stderr
src/interfaces/ecpg/test/expected/sql-desc.c
src/interfaces/ecpg/test/expected/sql-desc.stderr
src/interfaces/ecpg/test/expected/sql-describe.c
src/interfaces/ecpg/test/expected/sql-describe.stderr
src/interfaces/ecpg/test/expected/sql-dynalloc.c
src/interfaces/ecpg/test/expected/sql-dynalloc.stderr
src/interfaces/ecpg/test/expected/sql-dynalloc2.c
src/interfaces/ecpg/test/expected/sql-dynalloc2.stderr
src/interfaces/ecpg/test/expected/sql-dyntest.c
src/interfaces/ecpg/test/expected/sql-dyntest.stderr
src/interfaces/ecpg/test/expected/sql-execute.c
src/interfaces/ecpg/test/expected/sql-execute.stderr
src/interfaces/ecpg/test/expected/sql-fetch.c
src/interfaces/ecpg/test/expected/sql-fetch.stderr
src/interfaces/ecpg/test/expected/sql-func.c
src/interfaces/ecpg/test/expected/sql-func.stderr
src/interfaces/ecpg/test/expected/sql-indicators.c
src/interfaces/ecpg/test/expected/sql-indicators.stderr
src/interfaces/ecpg/test/expected/sql-insupd.c
src/interfaces/ecpg/test/expected/sql-insupd.stderr
src/interfaces/ecpg/test/expected/sql-oldexec.c
src/interfaces/ecpg/test/expected/sql-oldexec.stderr
src/interfaces/ecpg/test/expected/sql-parser.c
src/interfaces/ecpg/test/expected/sql-parser.stderr
src/interfaces/ecpg/test/expected/sql-quote.c
src/interfaces/ecpg/test/expected/sql-quote.stderr
src/interfaces/ecpg/test/expected/sql-show.c
src/interfaces/ecpg/test/expected/sql-show.stderr
src/interfaces/ecpg/test/expected/sql-sqlda.c
src/interfaces/ecpg/test/expected/sql-sqlda.stderr
src/interfaces/ecpg/test/expected/thread-alloc.c
src/interfaces/ecpg/test/expected/thread-prep.c
src/interfaces/ecpg/test/expected/thread-thread.c
src/interfaces/ecpg/test/expected/thread-thread_implicit.c
src/interfaces/ecpg/test/regression.h
src/test/isolation/isolation_main.c
src/test/modules/dummy_seclabel/expected/dummy_seclabel.out
src/test/modules/dummy_seclabel/sql/dummy_seclabel.sql
src/test/modules/test_ddl_deparse/expected/alter_function.out
src/test/modules/test_ddl_deparse/sql/alter_function.sql
src/test/modules/test_pg_dump/t/001_base.pl
src/test/modules/test_pg_dump/test_pg_dump--1.0.sql
src/test/modules/test_rls_hooks/expected/test_rls_hooks.out
src/test/modules/test_rls_hooks/sql/test_rls_hooks.sql
src/test/regress/expected/alter_generic.out
src/test/regress/expected/alter_operator.out
src/test/regress/expected/cluster.out
src/test/regress/expected/conversion.out
src/test/regress/expected/create_function_3.out
src/test/regress/expected/create_index.out
src/test/regress/expected/dependency.out
src/test/regress/expected/drop_if_exists.out
src/test/regress/expected/event_trigger.out
src/test/regress/expected/foreign_data.out
src/test/regress/expected/guc.out
src/test/regress/expected/object_address.out
src/test/regress/expected/privileges.out
src/test/regress/expected/regproc.out
src/test/regress/expected/roleattributes.out
src/test/regress/expected/rolenames.out
src/test/regress/expected/security_label.out
src/test/regress/expected/select_into.out
src/test/regress/expected/sequence.out
src/test/regress/expected/sequence_1.out
src/test/regress/expected/updatable_views.out
src/test/regress/input/largeobject.source
src/test/regress/input/tablespace.source
src/test/regress/output/largeobject.source
src/test/regress/output/largeobject_1.source
src/test/regress/output/tablespace.source
src/test/regress/sql/alter_generic.sql
src/test/regress/sql/alter_operator.sql
src/test/regress/sql/cluster.sql
src/test/regress/sql/conversion.sql
src/test/regress/sql/create_function_3.sql
src/test/regress/sql/create_index.sql
src/test/regress/sql/dependency.sql
src/test/regress/sql/drop_if_exists.sql
src/test/regress/sql/event_trigger.sql
src/test/regress/sql/foreign_data.sql
src/test/regress/sql/guc.sql
src/test/regress/sql/object_address.sql
src/test/regress/sql/privileges.sql
src/test/regress/sql/regproc.sql
src/test/regress/sql/roleattributes.sql
src/test/regress/sql/rolenames.sql
src/test/regress/sql/security_label.sql
src/test/regress/sql/select_into.sql
src/test/regress/sql/sequence.sql
src/test/regress/sql/updatable_views.sql
src/tools/msvc/vcregress.pl