From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Euler Taveira <euler(at)timbira(dot)com(dot)br>, Nick Dro <postgresql(at)walla(dot)co(dot)il>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Postgresql gives error that role goes not exists while it exists |
Date: | 2017-10-05 13:47:15 |
Message-ID: | 28473.1507211235@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Tue, Oct 3, 2017 at 8:47 AM, Euler Taveira <euler(at)timbira(dot)com(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2017-10-05 13:48:47 | Re: Partition-wise join for join between (declaratively) partitioned tables |
Previous Message | Robert Haas | 2017-10-05 13:45:14 | Re: [HACKERS] BUG #14825: enum type: unsafe use? |