Skip to content

Commit

Permalink
Remove security definer on explain_statement function
Browse files Browse the repository at this point in the history
[BF-2328]
  • Loading branch information
rdunklau committed Nov 20, 2023
1 parent 0d76ccd commit 96be6aa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
short_ver = 1.1.9
last_ver = 1.1.8
short_ver = 1.1.10
last_ver = 1.1.9
long_ver = $(shell git describe --long 2>/dev/null || echo $(short_ver)-0-unknown-g`git describe --always`)
generated = aiven_extras.control \
sql/aiven_extras--$(short_ver).sql \
Expand Down
1 change: 1 addition & 0 deletions sql/aiven_extras--1.1.8--1.1.9.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-- NOOP
6 changes: 0 additions & 6 deletions sql/aiven_extras.sql
Original file line number Diff line number Diff line change
Expand Up @@ -546,12 +546,6 @@ CREATE FUNCTION aiven_extras.explain_statement(
RETURNS SETOF JSON
RETURNS NULL ON NULL INPUT
LANGUAGE plpgsql
-- This is needed because otherwise the executing user would need to have the
-- SELECT privilege on all tables that are part of the plan.
SECURITY DEFINER
-- We don't want to force users to change statements (e.g. schema-prefix all
-- tables in the query), so this intentionally does not specifiy a search_path.
-- Still, this will not help with users having custom search paths.
AS $$
DECLARE
curs REFCURSOR;
Expand Down

0 comments on commit 96be6aa

Please sign in to comment.