Hi all.
I guess you all know what encapsulation is in object oriented programming, so can it be done on PostgreSQL level?
To be precise, let's suppose:
- I have a TABLE "test", owned by user "app_owner"
- I have a FUNCTION "test_fn", owned by user "app_owner"
- This function accesses "test"
- I have another user "app_user"
Can I grant priviledges to "app_user" to execute "test_fn", but not to access "test"?
Nix.