Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grant USAGE on debug schema #7265

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion sql/pre_install/schemas.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ GRANT USAGE ON SCHEMA
_timescaledb_internal,
_timescaledb_config,
timescaledb_information,
timescaledb_experimental
timescaledb_experimental,
_timescaledb_debug
TO PUBLIC;

8 changes: 2 additions & 6 deletions test/expected/debug_utils.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@
-- Please see the included NOTICE for copyright information and
-- LICENSE-APACHE for a copy of the license.
\c :TEST_DBNAME :ROLE_SUPERUSER
SET ROLE :ROLE_DEFAULT_PERM_USER;
SELECT _timescaledb_debug.extension_state();
extension_state
-----------------
created
(1 row)

SET ROLE :ROLE_DEFAULT_PERM_USER;
\set ON_ERROR_STOP 0
SELECT _timescaledb_debug.extension_state();
ERROR: permission denied for schema _timescaledb_debug at character 8
\set ON_ERROR_STOP 1
\c :TEST_DBNAME :ROLE_SUPERUSER
RESET ROLE;
DO $$
DECLARE
module text;
Expand Down
2 changes: 1 addition & 1 deletion test/sql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ set(TEST_FILES
ddl.sql
ddl_errors.sql
ddl_extra.sql
delete.sql
debug_utils.sql
delete.sql
drop_extension.sql
drop_hypertable.sql
drop_rename_hypertable.sql
Expand Down
7 changes: 2 additions & 5 deletions test/sql/debug_utils.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@
-- LICENSE-APACHE for a copy of the license.

\c :TEST_DBNAME :ROLE_SUPERUSER
SELECT _timescaledb_debug.extension_state();

SET ROLE :ROLE_DEFAULT_PERM_USER;

\set ON_ERROR_STOP 0
SELECT _timescaledb_debug.extension_state();
\set ON_ERROR_STOP 1

\c :TEST_DBNAME :ROLE_SUPERUSER
RESET ROLE;

DO $$
DECLARE
module text;
Expand Down
Loading