Re: user defined settings (aka user defined guc variables)

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: user defined settings (aka user defined guc variables)
Дата
Msg-id 3E015B9B.1080806@joeconway.com
обсуждение исходный текст
Ответ на Re: user defined settings (aka user defined guc variables)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Joe Conway <mail@joeconway.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: user defined settings (aka user defined guc variables)
Следующее
От: Philip Warner
Дата:
Сообщение: Re: v7.3.1 tar ready ... please check it ...