Обсуждение: Per-function configuration parameters loss

Поиск
Список
Период
Сортировка

Per-function configuration parameters loss

От
"Dmitry Samokhin"
Дата:
When any server configuration parameters (or variables) are set on a 
per-function basis, the script displayed in the pgAdmin SQL pane looks like 
this:

CREATE OR REPLACE FUNCTION ... ;
ALTER FUNCTION ... SET ...;

If then I edit the function body and save my work, all variables are lost, 
since (it can be cheked easily) pgAdmin does not generate neither SET option 
in the CREATE OR REPLACE FUNCTION command nor separate ALTER FUNCTION ... 
SET ... one.

This is critical since for security reasons functions with the SECURITY 
DEFINER option should contain appropriate 'search_path' variable setting. 
And now a DB developer/admin has to double-check per-function variables when 
editing functions using pgAdmin.

Regards,
Dmitry.

P.S. For 8.3 backend or later pgAdmin might generate the SET option within 
CREATE OR REPLACE FUNCTION command for the SQL pane. 




Re: Per-function configuration parameters loss

От
Dave Page
Дата:
2009/10/2 Dmitry Samokhin <sdld@mail.ru>:
> When any server configuration parameters (or variables) are set on a
> per-function basis, the script displayed in the pgAdmin SQL pane looks like
> this:
>
> CREATE OR REPLACE FUNCTION ... ;
> ALTER FUNCTION ... SET ...;
>
> If then I edit the function body and save my work, all variables are lost,
> since (it can be cheked easily) pgAdmin does not generate neither SET option
> in the CREATE OR REPLACE FUNCTION command nor separate ALTER FUNCTION ...
> SET ... one.
>
> This is critical since for security reasons functions with the SECURITY
> DEFINER option should contain appropriate 'search_path' variable setting.
> And now a DB developer/admin has to double-check per-function variables when
> editing functions using pgAdmin.

Thanks - fixed in SVN for 1.10.1


-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com