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'; select to_regrole(session_user); ERROR: invalid name syntax Is it expected behavior that session_user produces non quoted output and I should use quote_ident anywhere in code session_user? Is there other way (without extra type conversions) for getting oid of session_user?