Re: Custom session variables?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Custom session variables?
Дата
Msg-id 16931.1172871930@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Custom session variables?  (David Fetter <david@fetter.org>)
Ответы Re: Custom session variables?  ("Adam Rich" <adam.r@sbcglobal.net>)
Список pgsql-general
David Fetter <david@fetter.org> writes:
> On Fri, Mar 02, 2007 at 01:53:28PM -0600, Adam Rich wrote:
>> Is there any way to define custom variables per session scope?

> You can have them in PL/Perl(U), PL/Tcl(U) and PL/PythonU and other
> such PLs, and you can create SQL accessors for them.

Another possibility is the "customized GUC options" route: you can take
advantage of the fact that the backend will let you set variables that
don't exist yet, if they are in a namespace that postgresql.conf says
is OK.
http://www.postgresql.org/docs/8.2/static/runtime-config-custom.html
This approach probably doesn't scale nicely to a whole lotta values,
but for a dozen or so strings it'd work well enough.

            regards, tom lane

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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: [HACKERS] WITH/RECURSIVE plans
Следующее
От: "Adam Rich"
Дата:
Сообщение: Re: Custom session variables?