Pg notation

Поиск
Список
Период
Сортировка
От rir
Тема Pg notation
Дата
Msg-id 20210918213153.fikmnsvhxnh5kq23@localhost
обсуждение исходный текст
Список pgsql-docs
Hello all,

If there is no interest in a more formalized Postgres notation then
reading this is a waste of your time.  But accept the compliment
that all the doc/src/sgml/ref/<sql_command>.sgml synopses are well
and nicely done.

I turned to your documentation pages' synopses to create a _very_ partial
grammar for Pg SQL in Raku; just addressing pertinent commands in a small
codebase.  Simple stuff.  I went down a rabbit hole.

So now there is a grammar that could start formalizing and linting
Pg's notation language in its SGML form.  It uses added tags to identify
and isolate commands, subrules, etc. and relies on the existing tags
in and around the "Where" phrases.  The added tags unambiguously define
part of the notation while not restraining the visual layout to
pre-existing models.  The tags greatly simplify the parsing because the
grammar doesn't need to identify the specific command being parsed. 

Rewriting the doc/src/sgml/notation.sgml file is within my ability with
a monkey-see-monkey-do approach to SGML.

The variations of the "Where X is:" phrases might be halved by using
standard phrasing.  I think that would be noticed by few readers.
Mostly, this is at the "X may be:" versus "X is:" level.

My purpose was to learn about parsing, more Raku, and a little more SQL.
That was a success.  I did not consider that I would be steeping myself
in the notation language.  I am temporarially a quasi-expert of trivia
like there are 19 "[ , ... ]" usages--the least common form of the
repeat-with-comma rule.

Thanks for being Postgresql,
Rob



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

Предыдущее
От: PG Doc comments form
Дата:
Сообщение: Typos in 34.3.9. Truncating a Large Object
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Typos in 34.3.9. Truncating a Large Object