Doc patch
Doc patch
In pgsql-docs, this patch has been recommended to you.
Lacking consensus and so not included is the the deletion of
comments pointing between the ref/MOVE and FETCH files. These
were of the form:
Thanks for the software,
Rob
Re: Doc patch
От:
Laurenz Albe <laurenz.albe@cybertec.at>
Дата:
On Fri, 2021-10-15 at 12:52 -0400, rir wrote: > > In pgsql-docs, this patch has been recommended to you. > > Lacking consensus and so not included is the the deletion of > comments pointing between the ref/MOVE and FETCH files. These > were of the form: > > Just for context: the -docs thread that belongs to this is https://www.postgr.es/m/20211001163938.ifg4ayrsjwd7r6zr%40localhost Yours, Laurenz Albe
Re: Doc patch
От:
Bruce Momjian <bruce@momjian.us>
Дата:
On Fri, Oct 15, 2021 at 12:52:48PM -0400, rir wrote:
>
> In pgsql-docs, this patch has been recommended to you.
>
> Lacking consensus and so not included is the the deletion of
> comments pointing between the ref/MOVE and FETCH files. These
> were of the form:
>
>
Sorry, I am just looking at this patch.
> diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
> index 4cd4bcba80..1cadec3dc4 100644
> --- a/doc/src/sgml/plpgsql.sgml
> +++ b/doc/src/sgml/plpgsql.sgml
> @@ -3342,7 +3342,7 @@ BEGIN
> <literal>FETCH</literal>
>
>
> -FETCH direction { FROM | IN } cursor INTO target;
> +FETCH direction FROM | IN cursor INTO target;
>
If you look at pl/plpgsql/src/pl_gram.y, you can see in
read_fetch_direction() and complete_direction() that a lot of work is
done to make sure FROM/IN appears (see check_FROM). Therefore, I think
the above change is incorrect. Yes, this doesn't match the backend
syntax, probably because of syntax requirements of the PL/pgSQL
language.
>
> -MOVE direction { FROM | IN } cursor;
> +MOVE direction FROM | IN cursor;
>
Same above.
> diff --git a/doc/src/sgml/ref/fetch.sgml b/doc/src/sgml/ref/fetch.sgml
> index ec843f5684..5e19531742 100644
> --- a/doc/src/sgml/ref/fetch.sgml
> +++ b/doc/src/sgml/ref/fetch.sgml
> @@ -27,9 +27,9 @@ PostgreSQL documentation
>
>
>
> -FETCH [ direction [ FROM | IN ] ] cursor_name
> +FETCH [ direction ] [ FROM | IN ] cursor_name
>
> -where direction can be empty or one of:
> +where direction can one of:
>
> NEXT
> PRIOR
> diff --git a/doc/src/sgml/ref/move.sgml b/doc/src/sgml/ref/move.sgml
> index 4c7d1dca39..c4d859d7b0 100644
> --- a/doc/src/sgml/ref/move.sgml
> +++ b/doc/src/sgml/ref/move.sgml
> @@ -27,9 +27,9 @@ PostgreSQL documentation
>
>
>
> -MOVE [ direction [ FROM | IN ] ] cursor_name
> +MOVE [ direction ] [ FROM | IN ] cursor_name
>
> -where direction can be empty or one of:
> +where direction can one of:
You are right about the above to changes. The existing syntax shows
FROM/IN is only possible if a direction is specified, while
src/parser/gram.y says that FROM/IN with no direction is supported.
I plan to apply this second part of the patch soon.
--
Bruce Momjian https://momjian.us
EDB https://enterprisedb.com
Indecision is a decision. Inaction is an action. Mark Batterson
Re: Doc patch
От:
Bruce Momjian <bruce@momjian.us>
Дата:
On Fri, Aug 19, 2022 at 12:04:54PM -0400, Bruce Momjian wrote: > You are right about the above to changes. The existing syntax shows > FROM/IN is only possible if a direction is specified, while > src/parser/gram.y says that FROM/IN with no direction is supported. > > I plan to apply this second part of the patch soon. Patch applied back to PG 10. Thanks for the research on this. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Indecision is a decision. Inaction is an action. Mark Batterson