Re: Making config file parser available to add-ins

From: Marc Munro <marc(at)bloodnok(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Making config file parser available to add-ins
Date: 2006-07-24 19:15:34
Message-ID: 1153768534.30016.24.camel@bloodnok.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2006-07-24 at 14:44 -0400, Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > Marc Munro wrote:
> >> I want Veil (http://pgfoundry.org/projects/veil/) to be able to read
> >> configuration details from a configuration file.
>
> > What kind of details? By the time any server-side module is loaded, the
> > configuration file has already been read, so why would you need to read
> > it again?
>
> Probably the correct question is whether Marc's problem isn't already
> solved by the "custom GUC variable" mechanism --- that is, whatever he
> wants to configure should be defined as "custom" GUCs within the
> existing configuration file.

I don't think it's already solved but I may be missing the point. The
Veil shared library will be loaded by process_preload_libraries only
after the postgresql config file has been read. I was assuming that at
this point it would be too late to specify custom GUCs.

Instead I want to load my own "veil.conf" file which would support the
same sort of syntax as postgresql.conf.

My proposal is to simply expose a new function processAddinConfigFile()
which would mimic ProcessConfigFile but would call a user-supplied
function to deal with each entry. Obviously, this would be usable by
future add-ins and not just Veil.

If there is a better way to do this please tell me.
__
Marc

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-07-24 19:17:02 Re: Making config file parser available to add-ins
Previous Message Marc Munro 2006-07-24 19:08:10 Re: Making config file parser available to add-ins