postgresql/src/test/modules
Tom Lane a0ffa885e4 Allow granting SET and ALTER SYSTEM privileges on GUC parameters.
This patch allows "PGC_SUSET" parameters to be set by non-superusers
if they have been explicitly granted the privilege to do so.
The privilege to perform ALTER SYSTEM SET/RESET on a specific parameter
can also be granted.
Such privileges are cluster-wide, not per database.  They are tracked
in a new shared catalog, pg_parameter_acl.

Granting and revoking these new privileges works as one would expect.
One caveat is that PGC_USERSET GUCs are unaffected by the SET privilege
--- one could wish that those were handled by a revocable grant to
PUBLIC, but they are not, because we couldn't make it robust enough
for GUCs defined by extensions.

Mark Dilger, reviewed at various times by Andrew Dunstan, Robert Haas,
Joshua Brindle, and myself

Discussion: https://postgr.es/m/3D691E20-C1D5-4B80-8BA5-6BEB63AF3029@enterprisedb.com
2022-04-06 13:24:33 -04:00
..
brin Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
commit_ts Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
delay_execution Disallow setting bogus GUCs within an extension's reserved namespace. 2022-02-21 14:10:43 -05:00
dummy_index_am Update copyright for 2022 2022-01-07 19:04:57 -05:00
dummy_seclabel Update copyright for 2022 2022-01-07 19:04:57 -05:00
libpq_pipeline Remove unused module imports from TAP tests 2022-03-24 20:51:40 +01:00
plsample Update copyright for 2022 2022-01-07 19:04:57 -05:00
snapshot_too_old Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
spgist_name_ops pg_upgrade: Preserve relfilenodes and tablespace OIDs. 2022-01-17 13:40:27 -05:00
ssl_passphrase_callback Disallow setting bogus GUCs within an extension's reserved namespace. 2022-02-21 14:10:43 -05:00
test_bloomfilter Update copyright for 2022 2022-01-07 19:04:57 -05:00
test_ddl_deparse Update copyright for 2022 2022-01-07 19:04:57 -05:00
test_extensions Fix use-after-free bug with event triggers in an extension script 2020-09-15 21:03:14 -03:00
test_ginpostinglist Update copyright for 2022 2022-01-07 19:04:57 -05:00
test_integerset Update copyright for 2022 2022-01-07 19:04:57 -05:00
test_misc Remove PostgreSQL::Test::Utils::perl2host completely 2022-02-20 11:51:45 -05:00
test_oat_hooks Allow granting SET and ALTER SYSTEM privileges on GUC parameters. 2022-04-06 13:24:33 -04:00
test_parser Update copyright for 2022 2022-01-07 19:04:57 -05:00
test_pg_dump Allow granting SET and ALTER SYSTEM privileges on GUC parameters. 2022-04-06 13:24:33 -04:00
test_predtest Update copyright for 2022 2022-01-07 19:04:57 -05:00
test_rbtree Update copyright for 2022 2022-01-07 19:04:57 -05:00
test_regex Update copyright for 2022 2022-01-07 19:04:57 -05:00
test_rls_hooks Clean test_rls_hooks module 2022-03-23 15:11:45 -04:00
test_shm_mq Update copyright for 2022 2022-01-07 19:04:57 -05:00
unsafe_tests Allow granting SET and ALTER SYSTEM privileges on GUC parameters. 2022-04-06 13:24:33 -04:00
worker_spi Disallow setting bogus GUCs within an extension's reserved namespace. 2022-02-21 14:10:43 -05:00
Makefile Add a test module for Object Access hooks 2022-03-22 10:28:31 -04:00
README Add an enforcement mechanism for global object names in regression tests. 2019-06-29 11:34:00 -04:00

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".

Furthermore, while you can do "make install" and "make installcheck" in
this directory or its children, it is NOT ADVISABLE to do so with a server
containing valuable data.  Some of these tests may have undesirable
side-effects on roles or other global objects within the tested server.
"make installcheck-world" at the top level does not recurse into this
directory.

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.