Re: proposal: searching in array function - array_position

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: proposal: searching in array function - array_position
Дата
Msg-id 54B942E3.9020101@BlueTreble.com
обсуждение исходный текст
Ответ на 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>)
Re: proposal: searching in array function - array_position  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On 1/16/15 3:39 AM, Pavel Stehule wrote:
> I am proposing a simple function, that returns a position of element in array.

Yes please!

> FUNCTION array_position(anyarray, anyelement) RETURNS int

That won't work on a multi-dimensional array. Ideally it needs to accept a slice or an element and return the specifier
forthe slice.
 

This wouldn't be so bad if we had an easier way to extract subsets of an array, but even that is really ugly because
whateveryou extract keeps the original number of dimensions.
 

> Implementation is simple (plpgsql code)

This would actually be written in C though, yes? Otherwise it's not really any better than just doing an extension...
-- 
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com



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

Предыдущее
От: Marco Nenciarini
Дата:
Сообщение: Re: [RFC] Incremental backup v3: incremental PoC
Следующее
От: "peter@vanroose.be"
Дата:
Сообщение: Re: Temporal features in PostgreSQL