Re: User permissions - Mailing list pgsql-general

From Stephan Szabo
Subject Re: User permissions
Date
Msg-id 20020314074530.O433-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: User permissions  ("Lars Preben S. Arnesen" <l.p.arnesen@usit.uio.no>)
List pgsql-general
On 14 Mar 2002, Lars Preben S. Arnesen wrote:

> [ Stephan Szabo ]
>
> > Well, I'm not sure you can using only pl/pgsql, but if you don't grant
> > access to any of the tables, I know that in C you can have functions run
> > queries as a different user.
>
> This sounds interesting. Is there any simple examples for doing stuff
> like this?

Well, it involves SPI stuff and I think there's some docs on that and
examples floating around.  In the referential integrity triggers it
sets the user to the owner of the table that it's scanning
(backend/utils/adt/ri_triggers.c) but I wouldn't call that stuff
simple really.



pgsql-general by date:

Previous
From: Doug McNaught
Date:
Subject: Re: location of Large Object
Next
From: Stephan Szabo
Date:
Subject: Re: Question about function