From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: generate documentation keywords table automatically
Date: Sat, 27 Apr 2019 11:25:22 -0400
Message-ID: <21977.1556378722@sss.pgh.pa.us> (raw)
In-Reply-To: <07daeadd-8c82-0d95-5e19-e350502cb749@2ndquadrant.com>
References: <07daeadd-8c82-0d95-5e19-e350502cb749@2ndquadrant.com>
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> The SQL keywords table in the documentation had until now been generated
> by me every year by some ad hoc scripting outside the source tree once
> for each major release. This patch changes it to an automated process.
Didn't test this, but +1 for the concept.
Would it make more sense to have just one source file per SQL standard
version, and distinguish the keyword types by labels within the file?
The extreme version of that would be to format the standards-info files
just like parser/kwlist.h, which perhaps would even save a bit of
parsing code in the Perl script. I don't insist you have to go that
far, but lists of keywords-and-categories seem to make sense.
The thing in the back of my mind here is that at some point the SQL
standard might have more than two keyword categories. What you've got
here would take some effort to handle that, whereas it'd be an entirely
trivial data change in the scheme I'm thinking of.
A policy issue, independent of this mechanism, is how many different
SQL spec versions we want to show in the table. HEAD currently shows just
three (2011, 2008, SQL92), and it doesn't look to me like the table can
accommodate more than one or at most two more columns without getting
too wide for most output formats. We could buy back some space by making
the "cannot be X" annotations for PG keywords more compact, but I fear
that'd still not be enough for the seven spec versions you propose to
show in this patch. (And, presumably, the committee's not done.)
Can we pick a different table layout?
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com
Subject: Re: generate documentation keywords table automatically
In-Reply-To: <21977.1556378722@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox