Re: [PATCH] Fix LTREE subpath with negative offset - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Fix LTREE subpath with negative offset
Date
Msg-id 4030704.1762016676@sss.pgh.pa.us
Whole thread Raw
In response to [PATCH] Fix LTREE subpath with negative offset  (Marcus Gartner <m.a.gartner@gmail.com>)
List pgsql-hackers
Marcus Gartner <m.a.gartner@gmail.com> writes:
> subpath(ltree,offset,len) now correctly errors when given an offset less
> than -n where n is the number of labels in the given ltree. A duplicate
> block of code has been removed which allowed an offset as low as -2n.

Nice catch ... as far as I can see from the git history, that mistake
has been there since day one.

I'm inclined to put this in master only, without a back-patch.
It's not fixing any case that should work, and it seems possible
that somebody out there is depending on the bogus behavior.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: pg_plan_advice
Next
From: Philip Alger
Date:
Subject: Re: [PATCH] Add pg_get_type_ddl() to retrieve the CREATE TYPE statement