Re: Subscript expressions do not have to evaluate to integers - Mailing list pgsql-docs

From David G. Johnston
Subject Re: Subscript expressions do not have to evaluate to integers
Date
Msg-id CAKFQuwY_EtAVCRbu4HxDrHg1Wo0HMnD_uydFw=ZQzTMdDXDFqQ@mail.gmail.com
Whole thread Raw
In response to Re: Subscript expressions do not have to evaluate to integers  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Subscript expressions do not have to evaluate to integers  (Bruce Momjian <bruce@momjian.us>)
List pgsql-docs
On Fri, Aug 21, 2020 at 6:22 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Bruce Momjian <bruce@momjian.us> writes:
> On Wed, Jul 22, 2020 at 02:59:18AM +0000, PG Doc comments form wrote:
>> I believe a more appropriate statement would acknowledge that at least some
>> values undergo an explicit-style conversion to an integer.

> OK, how is the attached patch?

"and" is not an improvement over "which".  Otherwise seems OK.

(The proposed patch for generic subscripting will probably need to
rewrite this completely, but for now this is an improvement.)

I was going to add that maybe we should link to the round(dp or numeric) function in the documentation and let it be explicit about the rounding rules pertaining to half - which when I look isn't actually documented:

round(dp or numeric) (same as input) round to nearest integer

Maybe everyone just knows that rounding, unless otherwise stated, rounds halves away from zero but it doesn't seem like a bad idea to be explicit.

David J.

pgsql-docs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Typo in the Section "3.6. Inheritance"
Next
From: "David G. Johnston"
Date:
Subject: Re: Procedures