Re: Doc Rework: Section 9.16.13 SQL/JSON Query Functions

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Doc Rework: Section 9.16.13 SQL/JSON Query Functions
Date: 2024-07-09 07:19:35
Message-ID: CA+HiwqHtEw9A9t2sEyM2712vA5rRmOp1VdT3ij9zdgYC7JTzuQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 9, 2024 at 12:30 PM Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
> On Tue, Jul 9, 2024 at 10:39 AM jian he <jian(dot)universality(at)gmail(dot)com> wrote:
> > On Mon, Jul 8, 2024 at 8:57 PM Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
> > >
> > > Updated patch attached.
> > >
> >
> > Returns true if the SQL/JSON <replaceable>path_expression</replaceable>
> > - applied to the <replaceable>context_item</replaceable> using the
> > - <literal>PASSING</literal> <replaceable>value</replaceable>s yields any
> > - items.
> > + applied to the <replaceable>context_item</replaceable> doesn't yield
> > + any items.
> > should "doesn't" be removed?
> > should it be "yields"?
>
> Oops, fixed.
>
> > + set. The <literal>ON ERROR</literal> clause specifies the behavior
> > + if an error occurs when evaluating
> > <replaceable>path_expression</replaceable>,
> > + when coercing the result value to the
> > <literal>RETURNING</literal> type,
> > + or when evaluating the <literal>ON EMPTY</literal> expression if the
> > + <replaceable>path_expression</replaceable> evaluation results in an
> > + empty set.
> > last sentence, "in an empty set." should be "is an empty set"
>
> "results in an empty set" here means "the result of the evaluation is
> an empty set", similar to:
>
> $ git grep "results in an" doc
> doc/src/sgml/charset.sgml: results in an error, because even though
> the <literal>||</literal> operator
> doc/src/sgml/plpgsql.sgml: an omitted <literal>ELSE</literal>
> clause results in an error rather
> doc/src/sgml/plpython.sgml: If the second <literal>UPDATE</literal>
> statement results in an
> doc/src/sgml/pltcl.sgml: If the second <command>UPDATE</command>
> statement results in an
>
> Maybe I could just replace that by "returns an empty set".
>
> Will push shortly after making those changes.

And...pushed. Thanks for the reviews.

--
Thanks, Amit Langote

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2024-07-09 07:28:41 Re: Incorrect results from numeric round() and trunc()
Previous Message jian he 2024-07-09 07:15:39 Re: SQL:2011 application time