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

From Pavel Stehule
Subject Re: proposal: searching in array function - array_position
Date
Msg-id CAFj8pRAikQv9O72U35Z3KpgxFRRhgjYR2g0xu2DmaBX3tBukEg@mail.gmail.com
Whole thread Raw
In response to Re: proposal: searching in array function - array_position  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: proposal: searching in array function - array_position
List pgsql-hackers


2015-03-20 18:47 GMT+01:00 Tom Lane <tgl@sss.pgh.pa.us>:
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.

do you have any idea about name for this function? array_position is ok?

Regards

Pavel
 

                        regards, tom lane

pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Remove fsync ON/OFF as a visible option?
Next
From: Stephen Frost
Date:
Subject: Re: Remove fsync ON/OFF as a visible option?