Prev: Ask help for putting SP-Gist into postgresql
Next: [HACKERS] Postgres 9.0 Alpha, GIN indexes, and intarray contrib module, and SQL Functions
From: Marko Tiikkaja on 26 Mar 2010 05:44 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers |