Re: proposal: searching in array function - array_position - Mailing list pgsql-hackers

From Tom Lane
Subject Re: proposal: searching in array function - array_position
Date
Msg-id 14396.1426873661@sss.pgh.pa.us
Whole thread Raw
In response to Re: proposal: searching in array function - array_position  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: proposal: searching in array function - array_position
List pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Pavel Stehule wrote:
>> I am thinking, so it is ok - it returns a offset, not position.

> So you can't use it as a subscript?  That sounds unfriendly.  Almost
> every function using this will be subtly broken.

I concur; perhaps "offset" was the design intention, but it's wrong.
The result should be a subscript.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Remove fsync ON/OFF as a visible option?
Next
From: Robert Haas
Date:
Subject: Re: assessing parallel-safety