Re: Generating config stuff from single source

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Generating config stuff from single source
Дата
Msg-id 20060216113043.GA26127@svana.org
обсуждение исходный текст
Ответ на Generating config stuff from single source  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Generating config stuff from single source  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On Thu, Feb 16, 2006 at 02:36:01AM +0100, Peter Eisentraut wrote:
> We are currently maintaining information about configuration parameters
> in at least three places: the documentation, guc.c, and
> postgresql.conf.sample.  I would like to generate these from a single
> source.  Computationally, this is not very challenging, it's just a bit
> of work.  I imagine as the source an XML file with a custom schema; see
> below for an example.  I think this is the best source format because
> it allows integrating the DocBook-formatted descriptions without too
> much trouble and it allows for file format validation.  An alternative
> might be m4 but that would not offer these features.  To process this
> we'd use XSLT stylesheets run through xsltproc.  We'd run this part
> during the tarball building phase, so users would not need it.
> Obviously, all of this will need some fine-tuning, but can we agree on
> this general direction?

Is there any reason why we can't just use something like awk? It's
installed almost everywhere (it may be required, not sure) and a lot
more people know how to use it. I havn't managed to wrap my brain
around xslt yet.

The input file could be simply line based. Attached is a simple script
that takes the input below and produces something resembling what you
suggested. It wouldn't be too hard to get it to produce multiple output
formats and dump the output to different files...

----
Group: Query Tuning
Subgroup: Planner Method Configuration

Name: enable_hashagg
Context: userset

... etc ...
----

--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Generating config stuff from single source
Следующее
От: Florian Weimer
Дата:
Сообщение: Re: qsort again