Re: custom guc vars

Поиск
Список
Период
Сортировка
От Brent Verner
Тема Re: custom guc vars
Дата
Msg-id 20050502081536.GA22439@rcfile.org
обсуждение исходный текст
Ответ на custom guc vars  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
[2005-05-01 18:38] Andrew Dunstan said:
| 
| Is there a readme somewhere on how modules are supposed to use custom 
| GUC variables? If there is I have missed it.
 I don't think there is any documentation for this, but here's a
simple overview.

cheers.Brent

=== postgresql.conf ===
 custom_variable_classes = 'mymodule, anothermodule' mymodule.integer = 10 mymodule.double = 5.5 mymodule.string =
'somestring' mymodule.bool = true anothermodule.whatever = 'some string' anothermodule.other = false
 


=== moduleConfig.c ===
 #include <utils/guc.h>
 int anIntVar; char* aStringVar; double aDoubleVar; bool aBoolVar;
 void setCustomVars() {   DefineCustomIntegerVariable(       "mymodule.integer",       "A custom integer guc var",
NULL,       &anIntVar,       PGC_USERSET,       NULL,NULL);
 
   DefineCustomStringVariable(       "mymodule.string",       "A custom string guc var",       NULL,       &aStringVar,
     PGC_USERSET,       NULL,NULL);
 
   DefineCustomRealVariable(       "mymodule.double",       "A custom double guc var",       NULL,       &aDoubleVar,
   PGC_USERSET,       NULL,NULL);
 
   DefineCustomBoolVariable(       "mymodule.bool",       "A custom bool guc var",       NULL,       &aBoolVar,
PGC_USERSET,      NULL,NULL); }
 



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Feature freeze date for 8.1
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: Feature freeze date for 8.1