Search Postgresql Archives

Re: are there static variables in pgsql?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In article <95b926fc0606101531q38cc2d6aq6c63730d4796f184@xxxxxxxxxxxxxx>,
Yavuz Kavus <yavuzkavus@xxxxxxxxx> wrote:

% i am writing a recursive procedure in pl/pgsql.
% i need to check whether a condition is true in any step of recursive calls.

[...]

% i think i may achieve this with a static variable(shared among all calls).

I'm not sure a static variable is the right way to achieve this, but
you could use a custom_variable_class for this. Add this to your
postgresql.conf:
 custom_variable_classes='global'

Then you can set and show variables prefixed by global.:
 set global.success = 'true';

-- 

Patrick TJ McPhee
North York  Canada
ptjm@xxxxxxxxxxxx


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux