Re: proposal: searching in array function - array_position

Поиск
Список
Период
Сортировка
От Dean Rasheed
Тема Re: proposal: searching in array function - array_position
Дата
Msg-id CAEZATCVukO8LcYTjceH=NZzcmicPg-phg53kzuRiJS33_vhUDg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: searching in array function - array_position  (Pavel Stehule <pavel.stehule@gmail.com>)
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Mark Kirkwood
Дата:
Сообщение: Re: Remove fsync ON/OFF as a visible option?
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: PATCH: pgbench - merging transaction logs