Re: substring start position behavior

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: dansonlinepresence(at)gmail(dot)com
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: substring start position behavior
Date: 2024-03-06 03:24:47
Message-ID: Zefh_2-e9ILgmCjW@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Tue, Mar 5, 2024 at 09:47:54PM -0500, dansonlinepresence(at)gmail(dot)com wrote:
> Thanks for all that context and diff! The odd behavior is indeed in
> the SQL spec. At least I was convinced of that on postgres IRC by
> someone who seemed to have quoted from the spec. I don't think the
> feature ought to be hidden because it's odd.
>
> If I may suggest some specificity to the wording here, I think "start
> values less than 1" would avoid confusion about whether 0 is
> nonpositive or not, and bring attention to the function being
> 1-indexed rather than 0-indexed.

Sure, updated patch attached.

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.

Attachment Content-Type Size
substring.diff text/x-diff 1.2 KB

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2024-03-06 05:42:09 Re: substring start position behavior
Previous Message dansonlinepresence 2024-03-06 02:47:54 Re: substring start position behavior