pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: rir <rirans@comcast.net>
To: pgsql-docs@lists.postgresql.org
Subject: Pg notation
Date: Sat, 18 Sep 2021 17:31:53 -0400
Message-ID: <20210918213153.fikmnsvhxnh5kq23@localhost> (raw)

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





Message-ID: <20210918213153.fikmnsvhxnh5kq23@localhost>
Permalink:  ../20210918213153.fikmnsvhxnh5kq23@localhost/
Also on:    postgresql.org/message-id/20210918213153.fikmnsvhxnh5kq23@localhost

 · 

reply

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-docs@postgresql.org
  Cc: rirans@comcast.net, pgsql-docs@lists.postgresql.org
  Subject: Re: Pg notation
  In-Reply-To: <20210918213153.fikmnsvhxnh5kq23@localhost>

* 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