Set the function to run as SECURITY DEFINER
The owner/creator of the function must have the privileges to insert data into
the fore mentioned tables and it should do as you asked.
This feature is only available in 7.3 and above.

Regards
Donald Fraser

----- Original Message -----
From: "Kris Kiger" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 02, 2003 4:36 PM
Subject: [ADMIN] Login as different user inside of a function.


> Here's my problem.  I have user X calling a database function.  The
> function inserts data into table Y.  User X only has select access to
> this table.  Is there some way to allow user X to call a function that
> does an insert for him/her without user X having to have write access to
> table Y?  Is it possible to log in as another user inside of a function?
>  Thanks for the help!
>
> Kris
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to