Re: [HACKERS] Postgresql gives error that role goes not exists while it exists

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Postgresql gives error that role goes not exists while it exists
Дата
Msg-id 28473.1507211235@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Postgresql gives error that role goes not exists whileit exists  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Oct 3, 2017 at 8:47 AM, Euler Taveira <euler@timbira.com.br> wrote:
>> I'm not sure. I bet a dime that the role was created as "Iris" and you
>> are trying to assing "iris" (they are different). If you list the
>> roles, we can confirm that.

> I don't see how this would explain anything.

The query as given has obvious syntax problems:

regression=# select *
from users
where case when (select pg_has_role(select "current_user"(), 'hr_user'::name, 'MEMBER'::text)) then 1=1 else userstatus
<>'Active'end 
;
ERROR:  syntax error at or near "select"
LINE 3: where case when (select pg_has_role(select "current_user"(),...                                           ^

I'm betting that the complainant has tried to obscure what they actually
did, and has obscured away some critical detail --- maybe the case of the
user name, maybe something else.
        regards, tom lane


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] [BUGS] BUG #14825: enum type: unsafe use?
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] Partition-wise join for join between (declaratively)partitioned tables