Using this is a code smell
I guess it’s maybe a smell because you’re limiting the database capabilities down from SQL, which is very powerful, down to the postgrest set of abstractions. Maybe that’s okay for your app now and maybe it always will be. But in this case, it wasn’t.
If you completely trust your users, that's fine.
RLS: https://www.postgresql.org/docs/current/ddl-rowsecurity.html