Encapsulation of tables with functions - Mailing list pgsql-general

From Nikola Milutinovic
Subject Encapsulation of tables with functions
Date
Msg-id 000701c19cf4$e28a1ce0$0a3ea8c0@ev.co.yu
Whole thread Raw
List pgsql-general
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.

pgsql-general by date:

Previous
From: "Andy Samuel"
Date:
Subject: Re: again, LIKE operator
Next
From: "Ed Yu"
Date:
Subject: Re: create table with multiple unique fields