Re:Hands-On with PostgreSQL Authorization – Part 2 – Row-Lev...
by RedShift1 on Thursday March 17, 2022 @09:22AM
(#30710871)
I'm sure you can but I'm not smart enough to figure that out (I think some quoting is missing):
EXECUTE 'SET ROLE ' || (SELECT rolname FROM pg_roles WHERE oid = 17026)
But I wouldn't use those oid's because you are leaking some implementation detail, it's probably best to just stick with the actual role names instead of a reference.
EXECUTE 'SET ROLE ' || (SELECT rolname FROM pg_roles WHERE oid = 17026)
But I wouldn't use those oid's because you are leaking some implementation detail, it's probably best to just stick with the actual role names instead of a reference.