Re: Questions regarding SET option.

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Jignesh Shah <jignesh(dot)shah1980(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Questions regarding SET option.
Date: 2010-02-22 11:47:14
Message-ID: 162867791002220347s33798013icd47724215eadc88@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello

you can overwrite standard settings only for function

CREATE [ OR REPLACE ] FUNCTION
name ( [ [ argmode ] [ argname ] argtype [ { DEFAULT | = }
default_expr ] [, ...] ] )
[ RETURNS rettype
| RETURNS TABLE ( column_name column_type [, ...] ) ]
{ LANGUAGE lang_name
| WINDOW
| IMMUTABLE | STABLE | VOLATILE
| CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT
| [ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER
| COST execution_cost
| ROWS result_rows
| SET configuration_parameter { TO value | = value | FROM CURRENT } <<<===
| AS 'definition'
| AS 'obj_file', 'link_symbol'
} ...
[ WITH ( attribute [, ...] ) ]

Regards
Pavel Stehule

2010/2/22 Jignesh Shah <jignesh(dot)shah1980(at)gmail(dot)com>:
> Hello All,
>
> I have been writing a function with SECURITY DEFINER enabled. Basically, I
> am looking for ways to override the users SET option settings while
> executing my function to prevent the permissions breach. For example, to
> override "SET search_path", I am setting search path in my function before
> executing anything. Could any one please tell me what could be other SET
> options that I should take care?
>
> Moreover, how to revert back those settings just before returning from my
> function?
>
> Thanks, Jack

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2010-02-22 12:29:29 Re: Asynchronous queries - processing listen (notify) in a procedural language
Previous Message beulah prasanthi 2010-02-22 11:46:30 TypeCast: util.list to array type