Setting a session variable for a Postgres connection
已回答
Is it possible to issue the equivalent of either
SELECT set_config('app.current_tenant', '100', false); or
SET app.current_tenant = '100';
So that the value of app.current_tenant can be used for Row Level Security (RS)
Thanks !
请先登录再写评论。
Yes you can do it in Data Source properties -> Options tab -> Startup script. Just put
SET app.current_tenant = '100'
there and restart session.
That worked, thank you