Open robins opened 2 years ago
Hi @robins,
On a quick look, your suggestion seems reasonable to me. We will take this forward and try to commit the same. Thanks.
Hi @robins,
Non-superuser can't run the regression using 'make installcheck' command as they don't have permission to set the parameters such as lc_messages, lc_monetary etc. Also, if no-superuser executes the test case files manually on the database then he might get error while creating the extension, so I am just wondering how you are able to run the regression/test case files using non-superuser at your end. Can you please brief about the use case?
Ping @robins ?
Apologies @surajkharage19 on missing this earlier.
That understanding is correct (in that make installcheck
would still have superuser dependencies).
This PR was submitted a while back, but IIRC, this patch allows running regression tests directly (with pg_regress
). There could be other scenarios where this may be helpful, but IIRC the idea came up when trying to support this extension for RDS Postgres and this PR allows for some additional tests to be automated without breaking anything for existing users.
Allow non-superusers to run server-options regression test.
The server_options test uses pg_user_mapping catalog that is only available to postgres superusers. Thus means non-superusers fail this regression test by design.
Since most of that data is already available in pg_user_mappings view, using that instead additionally allows non-superusers to pass the test.