Re: How to use set/reset role in contrib_regression test?

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: How to use set/reset role in contrib_regression test?
Дата
Msg-id CAB7nPqQeHj-t6sPcAV6rK1dSNz=9V6ia4mLr_7sDk7PyMUBBYg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: How to use set/reset role in contrib_regression test?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: How to use set/reset role in contrib_regression test?
Список pgsql-hackers
On Fri, Dec 8, 2017 at 8:12 AM, David G. Johnston
<david.g.johnston@gmail.com> wrote:
> Probably -bugs (or -general if you are unsure about the buggy-ness) would
> have been a more appropriate list since this is all direct SQL that looks to
> be broken.  No use moving it now, though.

On HEAD, REL_10_STABLE or REL9_6_STABLE, say with two users:
=# create role popo1 superuser login;
CREATE ROLE
Time: 9.400 ms
=# create role popo2 login;
CREATE ROLE

And then by creating objects:
=# select current_role;
 current_user
--------------
 popo1
(1 row)
=# set role popo2;
SET
=> select current_role;
 current_user
--------------
 popo2
(1 row)
=> create table aa (a int);
CREATE TABLE
=> select current_role;
 current_user
--------------
 popo2
(1 row)
=> reset role;
RESET
=# select current_role;
 current_user
--------------
 popo1
(1 row)

Per the information you are giving, I would have seen "popo2" as user
for the last query even after issuing a RESET ROLE. However I do not
see any problems.

> Reporting the version(s) you are running would be helpful.

Indeed.
-- 
Michael


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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Usage of epoch in txid_current
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: User defined data types in Logical Replication