From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Ian Barwick <ian(at)2ndquadrant(dot)com> |
Cc: | Edson Richter <edsonrichter(at)hotmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Global value/global variable? |
Date: | 2014-06-19 03:13:36 |
Message-ID: | 11749.1403147616@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Ian Barwick <ian(at)2ndquadrant(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Alban Hertroys | 2014-06-19 06:45:14 | Re: Overlapping ranges |
Previous Message | Ian Barwick | 2014-06-19 03:08:04 | Re: Global value/global variable? |