Re: [GENERAL] Wanted: Want to hide data by using PL/PGSQL functions

2004-07-21 Thread Adam Witney
To return a result set use SETOF, like so CREATE FUNCTION test() RETURNS SETOF text AS ' To allow access to the tables only through a function, take a look at declaring your functions with SECURITY DEFINER CREATE FUNCTION test() RETURNS SETOF text SECURITY DEFINER AS ' .. Inside the function y

Re: [GENERAL] Wanted: Want to hide data by using PL/PGSQL functions

2004-07-21 Thread Ben
It sounds like you want a table function: http://techdocs.postgresql.org/guides/SetReturningFunctions On Wed, 21 Jul 2004, Gellert, Andre wrote: > Hello, > I have following problem: > > A user "xy" shouldn't have any rights to a table, > but needs data from the content of the table. > My idea

[GENERAL] Wanted: Want to hide data by using PL/PGSQL functions

2004-07-21 Thread Gellert, Andre
Hello, I have following problem: A user "xy" shouldn't have any rights to a table, but needs data from the content of the table. My idea was to setup a PL/PGSQL procedure to fetch the data from the table, so that the user only is allowed to access the procedure. I also tried using a SQL function