Re: can I define own variables? - Mailing list pgsql-general

From Tom Lane
Subject Re: can I define own variables?
Date
Msg-id 10109.1192243797@sss.pgh.pa.us
Whole thread Raw
In response to Re: can I define own variables?  (Guy Rouillier <guyr-ml1@burntmail.com>)
Responses Re: can I define own variables?  (Guy Rouillier <guyr-ml1@burntmail.com>)
List pgsql-general
Guy Rouillier <guyr-ml1@burntmail.com> writes:
> Tom Lane wrote:
>> Another possibility, if you only need to store and retrieve values
>> and not do anything especially interesting with them, is to abuse
>> the "custom GUC variable" facility.

> I've had several occasions when a user-defined variable would have come
> in handy.  What is the scope of user_vars as you've defined them above?

They'd act like any other GUC variable.  The scope of a SET would be the
current connection, but there are other ways to set them with larger scope.

            regards, tom lane

pgsql-general by date:

Previous
From: Guy Rouillier
Date:
Subject: Re: can I define own variables?
Next
From: Ron Peterson
Date:
Subject: Re: convert binary string to datum