From: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Marko Tiikkaja <marko(at)joh(dot)to>, 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-21 07:59:07 |
Message-ID: | CAEZATCVukO8LcYTjceH=NZzcmicPg-phg53kzuRiJS33_vhUDg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>>> do you have any idea about name for this function? array_position is ok?
>>
>> +1 on array_position. It's possible at some point we'll actually want
>> array_offset that does what it claims.
>
+1 for array_position.
-1 for keeping array_offset. I'm not convinced that there are
sufficient use cases for it. No other array functions deal in offsets
relative to the first element, and if you do want that, it is trivial
to achieve with array_position() and array_lower(). IMO having 2
functions for searching in an array will just increase the risk of
users picking the wrong one by accident.
Regards,
Dean
From | Date | Subject | |
---|---|---|---|
Next Message | Fabien COELHO | 2015-03-21 09:37:05 | Re: PATCH: pgbench - merging transaction logs |
Previous Message | Mark Kirkwood | 2015-03-21 07:00:37 | Re: Remove fsync ON/OFF as a visible option? |