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
Ответ на
Список
Дерево обсуждения
[HACKERS] Postgresql gives error that role goes not exists while it exists Nick Dro <postgresql@walla.co.il>
Re: [HACKERS] Postgresql gives error that role goes not exists whileit exists Euler Taveira <euler@timbira.com.br>
Re: [HACKERS] Postgresql gives error that role goes not exists whileit exists Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Postgresql gives error that role goes not exists while it exists Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Postgresql gives error that role goes not exists whileit exists Craig Ringer <craig@2ndquadrant.com>
Re: [HACKERS] Postgresql gives error that role goes not exists while it exists Tom Lane <tgl@sss.pgh.pa.us>
Robert Haas writes: > On Tue, Oct 3, 2017 at 8:47 AM, Euler Taveira 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 по дате отправления
От: Alvaro Herrera
Дата: