Re: Permissions within a function

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Thomas Hallgren <thhal(at)mailblocks(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Permissions within a function
Date: 2004-12-18 09:15:01
Message-ID: 200412181015.01219.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Hallgren wrote:
> Is there a way to bypass security checks that retains the SQL parser?
> I'd like my C-code to do something like:
>
> impersonate pgadmin
> SELECT image from class_table
> revert to self

You can use GetUserId() and SetUserId() to flip the current user
identity around as you like. For such a simple query, however, it
might seem better to bypass SPI altogether and do a straight table
lookup through lower-level functions.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2004-12-18 09:25:11 Re: double error msg [ 8.0 rc1 ]
Previous Message Mike G 2004-12-18 07:18:36 Re: Dump from cygwin directly to windows