From: | Joe Conway <mail(at)joeconway(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: user defined settings (aka user defined guc variables) |
Date: | 2002-12-19 05:39:39 |
Message-ID: | 3E015B9B.1080806@joeconway.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Joe Conway <mail(at)joeconway(dot)com> writes:
>>I've been playing around with making it possible to create user defined guc
>>variables. This has been discussed, at least in passing, before. And it is
>>even anticipated in guc.c as a possible future feature:
>
> It's fairly clear how the mechanisms for this would work. What's less
> clear to me is what's the point? I do not see any reason to have a GUC
> variable that isn't defined and used by some chunk of low-level C code.
Well, the java example (CLASSPATH) I gave is one instance. The value could be
accessed by C code in a user defined function.
Another example is an application I have at work. It is designed as a single
app that is configured and used in multiple physical locations. Eventually all
the data are collected in one central instance of the app, and therefore each
instance needs its own guid that is stamped on every record in the database.
Currently we store the guid in a single row table that gets populated by the
install script. Could we continue to do it this way -- sure. But it seems
like a natural place to use a configuration setting.
Another example I thought about was session information for a web app. Lots of
people use fairly small tables with a high churn rate to do this. A user
defined setting could be used to store these like persistent cookies without
building up large numbers of dead tuples that need vacuuming all the time.
I know all of these can be done in other ways. If there's no interest, I'll
accept that this was a dumb idea and move on ;-)
Joe
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-12-19 06:12:37 | Re: [Fwd: SETOF input parameters (was Re: [HACKERS] proposal: |
Previous Message | Tom Lane | 2002-12-19 05:12:18 | Re: user defined settings (aka user defined guc variables) |