Re: can I define own variables?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Guy Rouillier <guyr-ml1(at)burntmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: can I define own variables?
Date: 2007-10-13 02:49:57
Message-ID: 10109.1192243797@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Guy Rouillier <guyr-ml1(at)burntmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Peterson 2007-10-13 03:32:14 Re: convert binary string to datum
Previous Message Guy Rouillier 2007-10-13 02:29:39 Re: can I define own variables?