Search Postgresql Archives

Invalid name syntax on to_regrole(session_user)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux