From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Guyren Howe <guyren(at)gmail(dot)com>, Pg Docs <pgsql-docs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Please provide examples of rows from |
Date: | 2020-10-05 20:28:28 |
Message-ID: | 20201005202828.GC4993@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
On Thu, Sep 24, 2020 at 03:37:14PM -0400, Bruce Momjian wrote:
> On Thu, Sep 24, 2020 at 03:05:24PM -0400, Tom Lane wrote:
> > Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > > Yes, this is very helpful. I was afraid the JSON would overwhelm the
> > > example, but this looks good. I wrote the attached doc patch which I
> > > think improves this. I plan to apply it to all supported versions.
> >
> > Couple thoughts:
> >
> > * Taking the initial ... out of the syntax synopsis is not an improvement.
> > It makes it look like you can only apply AS to the first function of a
> > ROWS FROM.
>
> Oh, so the dots represent optional non-column_definition function calls.
> I can't think if a cleaner way to show that, so I guess "..." will have
> to do.
>
> > * I think the ORDER BY adds nothing to the example except complication
> > and confusion.
>
> I wanted to highlight that the column_definition specifies the data type
> of the column in other parts of the query.
>
> > * Maybe the other sentence of explanation would read better as
> >
> > json_to_recordset() is instructed to return two columns,
> > the first integer and the second text. The result of
> > generate_series() is used directly.
>
> OK, better. New patch attached.
Patch applied to all supported versions. Thanks to Tom for proposing
the example query, and to the original reporter. :-)
--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2020-10-05 20:31:12 | Re: Documentation: 21.5. Default Roles |
Previous Message | Pavel Stehule | 2020-10-05 16:56:33 | Re: Wrong parameter names for make_interval (Postgres 13) |