Re[2]: Invalid name syntax on to_regrole(session_user)

2020-04-14 Thread Ц
Thank you for clarification! PS: Re-reading initial message, I feel ashamed for such foolish questions. >Вторник, 14 апреля 2020, 17:04 +03:00 от Tom Lane : > >=?UTF-8?B?0KY=?= < pf...@mail.ru > writes: >> create role "dot.net" >> set session authorization 'dot.net'; >> select to_regrole(session

Re: Invalid name syntax on to_regrole(session_user)

2020-04-14 Thread Tom Lane
=?UTF-8?B?0KY=?= writes: > create role "dot.net" > set session authorization 'dot.net'; > select to_regrole(session_user); ERROR: invalid name syntax Well, we've got this: regression=> select session_user; session_user -- dot.net (1 row) which is reasonable: that output shouldn't

Invalid name syntax on to_regrole(session_user)

2020-04-14 Thread Ц
Hello! I store pg_roles.oid::int as numeric representation of database role. Now I need to get this number for session user. I used to_regrole(session_user) function. Everything works fine till I allow roles with dots in role`s name. create role "dot.net" set session authorization 'dot.net'; sel