Re: proposal: searching in array function - array_position

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: proposal: searching in array function - array_position
Дата
Msg-id CAFj8pRCq59NtOhDnX3wj5WdvC8UcKVZkA-CEcDF1ZK=AVVxUfw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: searching in array function - array_position  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Ответы Re: proposal: searching in array function - array_position  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список pgsql-hackers


2015-01-26 23:29 GMT+01:00 Jim Nasby <Jim.Nasby@bluetreble.com>:
On 1/26/15 4:17 PM, Pavel Stehule wrote:
    Any way to reduce the code duplication between the array and non-array versions? Maybe factor out the operator caching code?


I though about it - but there is different checks, different result processing, different result type.

I didn't find any readable and reduced form :(

Yeah, that's why I was thinking specifically of the operator caching code... isn't that identical? That would at least remove a dozen lines...

It is only partially identical - I would to use cache for array_offset, but it is not necessary for array_offsets .. depends how we would to modify current API to support externally cached data.

Regards

Pavel

 

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

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

Предыдущее
От: Abhijit Menon-Sen
Дата:
Сообщение: Re: a fast bloat measurement tool (was Re: Measuring relation free space)
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: row_to_array function