Oauth: Set secure search_path
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
-- Function that reassign the owner of a table to their ownership_role
|
-- Function that reassign the owner of a table to their ownership_role
|
||||||
CREATE OR REPLACE FUNCTION @extschema@.CDB_OAuthReassignTableOwnerOnCreation()
|
CREATE OR REPLACE FUNCTION @extschema@.CDB_OAuthReassignTableOwnerOnCreation()
|
||||||
RETURNS event_trigger
|
RETURNS event_trigger
|
||||||
SECURITY DEFINER
|
|
||||||
AS $$
|
AS $$
|
||||||
DECLARE
|
DECLARE
|
||||||
obj record;
|
obj record;
|
||||||
@@ -27,7 +26,11 @@ BEGIN
|
|||||||
END IF;
|
END IF;
|
||||||
END LOOP;
|
END LOOP;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE plpgsql VOLATILE PARALLEL UNSAFE;
|
$$ LANGUAGE plpgsql
|
||||||
|
VOLATILE
|
||||||
|
PARALLEL UNSAFE
|
||||||
|
SECURITY DEFINER
|
||||||
|
SET search_path = @extschema@, pg_temp;
|
||||||
|
|
||||||
-- Creates the trigger on DDL events in order to reassign the owner
|
-- Creates the trigger on DDL events in order to reassign the owner
|
||||||
CREATE OR REPLACE FUNCTION @extschema@.CDB_EnableOAuthReassignTablesTrigger()
|
CREATE OR REPLACE FUNCTION @extschema@.CDB_EnableOAuthReassignTablesTrigger()
|
||||||
|
|||||||
Reference in New Issue
Block a user