Re: proposal: searching in array function - array_position

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: proposal: searching in array function - array_position
Дата
Msg-id 54C6B950.6020500@BlueTreble.com
обсуждение исходный текст
Ответ на Re: proposal: searching in array function - array_position  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal: searching in array function - array_position  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On 1/24/15 2:48 AM, Pavel Stehule wrote:
> with array_offsets - returns a array of offsets

+         <entry>returns a offset of first occurrence of some element in a array. It uses
should be
+         <entry>returns the offset of the first occurrence of some element in an array. It uses

+         <entry>returns a array of offset of all occurrences some element in a array. It uses
should be
+         <entry>returns an array of the offsets of all occurrences of some element in an array. It uses

Any way to reduce the code duplication between the array and non-array versions? Maybe factor out the operator caching
code?

You should remove the array_length() from the last array_offsets test; I don't see that it buys anything.

I think there should be tests for what happens when you feed these functions a multi-dimensional array.

Other than that, looks good.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com



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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: plpgsql - Assert statement
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: pg_upgrade and rsync