Re: Global value/global variable? - Mailing list pgsql-general

From Tom Lane
Subject Re: Global value/global variable?
Date
Msg-id 11749.1403147616@sss.pgh.pa.us
Whole thread Raw
In response to Re: Global value/global variable?  (Ian Barwick <ian@2ndquadrant.com>)
List pgsql-general
Ian Barwick <ian@2ndquadrant.com> writes:
> On 19/06/14 11:50, Edson Richter wrote:
>> It is possible to define a global value/variable in PostgreSQL in a way that I can use it in any
query/view/function?

> There's no such thing as a global variable, but why not use a table
> to store any global configuration values?

Actually, people do regularly (ab)use custom GUC variables for this
purpose.  But a table is not a bad solution.  The GUC solution does
not scale to more than order-of-a-hundred values.

            regards, tom lane


pgsql-general by date:

Previous
From: Ian Barwick
Date:
Subject: Re: Global value/global variable?
Next
From: Alban Hertroys
Date:
Subject: Re: Overlapping ranges