pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: rir <rirans@comcast.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: rir <rirans@comcast.net>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: small patch
Date: Sat, 9 Oct 2021 17:31:07 -0400
Message-ID: <20211009213107.z3ffgqorqmbwqabp@localhost> (raw)
In-Reply-To: <175281.1633638256@sss.pgh.pa.us>
References: <20211001163938.ifg4ayrsjwd7r6zr@localhost>
	<1c0eefa304434f67fd6a5a9d3f420d59ac74623a.camel@cybertec.at>
	<20211007033905.pmsg5qnyqceepfva@localhost>
	<9f703511c57d6bb0f44f9a968414869854ae50ea.camel@cybertec.at>
	<20211007200612.rkxxgeorw6w4fpjp@localhost>
	<175281.1633638256@sss.pgh.pa.us>

On Thu, Oct 07, 2021 at 04:24:16PM -0400, Tom Lane wrote:
> rir <rirans@comcast.net> writes:
> > On Thu, Oct 07, 2021 at 07:58:47AM +0200, Laurenz Albe wrote:
> >> Can you think of a way to modify the syntax diagram so that it
> >> expresses that and still remains comprehensible?
> 
> > For myself,
> >    'FETCH [ <direction> [ FROM | IN ] ] <cursor_name>'
> > clearly indicates that 'direction' is optional.

> 
> 	FETCH FROM cursor_name
> 
> which in fact is legal.  I think however that we could make it read
> 
> 	FETCH [ <direction> ] [ FROM | IN ] <cursor_name>'
> 
> and have a correct description without requiring <direction>
> to be allowed to be empty.

> BTW, as it stands, the diagram is ambiguous
> because there are two ways to parse
> 
> 	FETCH cursor_name
> 
> ... is <direction> present but empty, or omitted altogether?

I am confident you know what you mean, but I don't.  At the _parsing_
stage how is any distinction between emptiness and omission?

I can correct the patch to reflect the rightness of
    FETCH [ <direction> ] [ FROM | IN ] <cursor_name>
in the sgml file and at least one misquote I have found.

Not being here that often, I will wait to see this conversation resolve.

Rob





view thread (16+ messages)  latest in thread

Message-ID: <20211009213107.z3ffgqorqmbwqabp@localhost>
Permalink:  ../20211009213107.z3ffgqorqmbwqabp@localhost/
Also on:    postgresql.org/message-id/20211009213107.z3ffgqorqmbwqabp@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, tgl@sss.pgh.pa.us, laurenz.albe@cybertec.at, pgsql-docs@lists.postgresql.org
  Subject: Re: small patch
  In-Reply-To: <20211009213107.z3ffgqorqmbwqabp@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