Re: are there static variables in pgsql?

Поиск
Список
Период
Сортировка
От ptjm@interlog.com (Patrick TJ McPhee)
Тема Re: are there static variables in pgsql?
Дата
Msg-id 4f49cfF1hd2uhU1@uni-berlin.de
обсуждение исходный текст
Ответ на are there static variables in pgsql?  ("Yavuz Kavus" <yavuzkavus@gmail.com>)
Ответы Re: are there static variables in pgsql?  (Kenneth Downs <ken@secdat.com>)
Список pgsql-general
In article <95b926fc0606101531q38cc2d6aq6c63730d4796f184@mail.gmail.com>,
Yavuz Kavus <yavuzkavus@gmail.com> 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@interlog.com

В списке pgsql-general по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: TOAST not working
Следующее
От: Jorge Godoy
Дата:
Сообщение: Re: delete seems to be getting blocked