Skip to content
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
6 changes: 4 additions & 2 deletions sql/test_factory.sql
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,10 @@ BEGIN
END
$body$;

--select (tf.get('moo','moo')::moo).*;
-- Restore the caller's role saved at the top of this script.
/*
* select (tf.get('moo','moo')::moo).*;
* Restore the caller's role saved at the top of this script.
*/
DO $body$
BEGIN
EXECUTE 'SET ROLE ' || pg_catalog.quote_ident(pg_catalog.current_setting('test_factory.original_role'));
Expand Down
6 changes: 4 additions & 2 deletions test/install/load.sql
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@ SELECT :'load_mode' = 'existing' AS is_existing
CREATE SCHEMA IF NOT EXISTS tap;
CREATE EXTENSION IF NOT EXISTS pgtap SCHEMA tap;

-- Captured before either branch below runs CREATE EXTENSION, so the
-- role-restore proof after \endif covers whichever one actually ran.
/*
* Captured before either branch below runs CREATE EXTENSION, so the
* role-restore proof after \endif covers whichever one actually ran.
*/
SELECT current_user AS role_before_install
\gset

Expand Down
Loading