How to use set/reset role in contrib_regression test?

Поиск
Список
Период
Сортировка
От Jeremy Finzel
Тема How to use set/reset role in contrib_regression test?
Дата
Msg-id CAMa1XUj34wyqCAs-+-_-F2MrstJyV6zoAth+J_R5BakUrEaoJQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: How to use set/reset role in contrib_regression test?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-hackers
Hello!  I hope this is the right list for extension dev questions?

I am finding odd behavior running make installcheck for a postgres extension.  The user running the suite is a superuser ("jfinzel").  Once I create any object as a test role, reset role does not work, although it does work to do set role jfinzel.  See:

SELECT CURRENT_ROLE;
 current_user
--------------
 jfinzel
(1 row)

SET ROLE test_pgl_ddl_deploy;
SELECT CURRENT_ROLE;
    current_user
---------------------
 test_pgl_ddl_deploy
(1 row)

RESET ROLE;
SELECT CURRENT_ROLE;
 current_user
--------------
 jfinzel
(1 row)

SET ROLE test_pgl_ddl_deploy;
CREATE SCHEMA special;
CREATE TABLE special.foo (id serial primary key, foo text, bar text);
CREATE TABLE special.bar (id serial primary key, super text, man text);
SELECT CURRENT_ROLE;
    current_user
---------------------
 test_pgl_ddl_deploy
(1 row)

RESET ROLE;
SELECT CURRENT_ROLE;
    current_user
---------------------
 test_pgl_ddl_deploy
(1 row)

SET SESSION AUTHORIZATION DEFAULT;
RESET ROLE;
SELECT CURRENT_ROLE;
    current_user
---------------------
 test_pgl_ddl_deploy
(1 row)


What am I missing here?  Any comments much appreciated.

Thanks,
Jeremy Finzel

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Proposal: Local indexes for partitioned table
Следующее
От: David Rowley
Дата:
Сообщение: Re: [HACKERS] Proposal: Local indexes for partitioned table