Generating config stuff from single source - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Generating config stuff from single source
Date
Msg-id 200602160236.01963.peter_e@gmx.net
Whole thread Raw
Responses Re: Generating config stuff from single source
Re: Generating config stuff from single source
List pgsql-hackers
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?


<parameters> <group>   <title>Query Tuning</title>
   <subgroup>     <title>Planer Method Configuration</title>
     <parameter>       <name>enable_hashagg</name>       <context>userset</context>       <shortdesc>Enables the
planner'suse of hashed aggregation         plans.</shortdesc>       <longdesc>blah</longdesc>
<vartype>bool</vartype>      <variable>enable_hashagg</variable>       <resetval>true</resetval>       <min>...</min>
   <max>...</max>       <assignhook>...</assignhook>       <showhook>...</showhook>     </parameter>
 
   </subgroup> </group>
</parameters>

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: qsort again (was Re: [PERFORM] Strange Create Index behaviour)
Next
From: "Dann Corbit"
Date:
Subject: Re: qsort again (was Re: [PERFORM] Strange Create Index behaviour)