Re: proposal: searching in array function - array_position

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Marko Tiikkaja <marko(at)joh(dot)to>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: proposal: searching in array function - array_position
Date: 2015-03-20 17:47:41
Message-ID: 14396.1426873661@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-03-20 18:07:55 Re: assessing parallel-safety
Previous Message Tom Lane 2015-03-20 17:45:25 Re: Remove fsync ON/OFF as a visible option?