Re: PostgreSQL User-Defined Global Variables

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: PostgreSQL User-Defined Global Variables
Дата
Msg-id 20050707043335.GA68959@winnie.fuhr.org
обсуждение исходный текст
Ответ на PostgreSQL User-Defined Global Variables  ("Van Ingen, Lane" <lvaningen@ESNCC.com>)
Список pgsql-novice
On Wed, Jul 06, 2005 at 03:16:56PM -0400, Van Ingen, Lane wrote:
>
> Is it possible, via standard PostgreSQL or an extension, to set
> up a user-defined global variable outside of a stored procedure,
> and be able to query against the value of that variable?

Some people use temporary tables for storing such values.  Another
way would be to write set/get functions in a language that supports
global storage (PL/Perl, PL/Tcl, PL/Python, etc.).  See for example
the set_var() and get_var() functions in the PL/Perl documentation:

http://www.postgresql.org/docs/8.0/static/plperl-global.html

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: User Defined Note Order Problem
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: [despammed] PostgreSQL User-Defined Global Variables