9f95bf56a7b6400ebce9e6faad90a434d21ac8 Mon Sep 17 00:00:00 2001
From: Nikhil Benesch
Date: Sun, 1 Nov 2020 15:53:17 -0500
Subject: [PATCH] Support negative indexes in split_part
Negative indexes count from the right instead of the left.
For example:
split_part('a@b@c@d', -2) ->
Nikhil Benesch writes:
> I posted the idea of allowing negative indexes in split_part to pgsql-general
> last week, and it seemed there was some interest:
> http://postgr.es/m/CAPWqQZR%2B-5pAZNSSrnmYczRaX-huemc%3DoO8URvDZvUA-M%3DMOBA%40mail.gmail.com
> Attached is a patch, based on master, that im
On 11/1/20 9:56 PM, Tom Lane wrote:
Please add an entry to the upcoming commitfest, to make sure we don't
lose track of this:
https://commitfest.postgresql.org/30/
Done: https://commitfest.postgresql.org/30/2816/
The following review has been posted through the commitfest application:
make installcheck-world: tested, passed
Implements feature: tested, passed
Spec compliant: not tested
Documentation:not tested
Patch looks good to me. Seems like a useful feature, and I agree that
Jacob Champion writes:
> Patch looks good to me. Seems like a useful feature, and I agree that the
> two-pass implementation makes the change very easy to review.
LGTM too. I made a couple of cosmetic improvements and pushed it.
> Quick note on test coverage: gcov marks the "needle not found"