Re: Proposal: access control jails (and introduction as aspiring GSoC student) - Mailing list pgsql-hackers

From Marko Tiikkaja
Subject Re: Proposal: access control jails (and introduction as aspiring GSoC student)
Date
Msg-id 4BAC81E5.7030405@cs.helsinki.fi
Whole thread Raw
In response to Re: Proposal: access control jails (and introduction as aspiring GSoC student)  (Joseph Adams <joeyadams3.14159@gmail.com>)
List pgsql-hackers
On 3/26/10 5:42 AM +0200, Joseph Adams wrote:
> // New libpq function
> pg_set('current_user', 'bob');
>
> $result = pg_query_params(
>     'SELECT answer FROM secrets WHERE user=current_user AND question=$1',
>     array('Birth place'));
>
>
> What this really does is something like:
>
> $result = pg_query_params(
>     'LET current_user=$1 DO $2 $3',
>     array(
>         'bob',
>         'SELECT answer FROM secrets WHERE user=current_user AND question=$1',
>         'Birth place')
>     ));

Looks to me like this is already achievable with custom GUCs and views.


Regards,
Marko Tiikkaja


pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Incrementally Updated Backups and restartpoints
Next
From: Mike Lewis
Date:
Subject: Postgres 9.0 Alpha, GIN indexes, and intarray contrib module, and SQL Functions