5 ms·
Note that the RLS implementation in postgres does not require that different database users are being used. That's one of several possible ways to use it. You
by anarazel 11y ago
Note that the RLS implementation in postgres does not require that different database users are being used.
That's one of several possible ways to use it.
You e.g. alternatively can define a function that sets up a connection's user, where user refers to a concept of your schema. That's then stored somewhere in the session's state (trivially e.g. in a temporary table). All the row level restrictions can then refer to that user.