Re: proposal: searching in array function - array_position

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: proposal: searching in array function - array_position
Дата
Msg-id CAFj8pRBy5fx9tjz0XWSy5EK3S+LpWs2KF+pe4qd8X7Vx+EmyLg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: searching in array function - array_position  (Petr Jelinek <petr@2ndquadrant.com>)
Ответы Re: proposal: searching in array function - array_position  (Petr Jelinek <petr@2ndquadrant.com>)
Re: proposal: searching in array function - array_position  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список pgsql-hackers


2015-02-22 3:00 GMT+01:00 Petr Jelinek <petr@2ndquadrant.com>:
On 28/01/15 08:15, Pavel Stehule wrote:


2015-01-28 0:01 GMT+01:00 Jim Nasby <Jim.Nasby@bluetreble.com
<mailto:Jim.Nasby@bluetreble.com>>:

    On 1/27/15 4:36 AM, Pavel Stehule wrote:


        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.


    Externally cached data?


Some from these functions has own caches for minimize access to typcache
(array_map, array_cmp is example). And in first case, I am trying to
push these information from fn_extra, in second case I don't do it,
because I don't expect a repeated call (and I am expecting so type cache
will be enough).


You actually do caching via fn_extra in both case and I think that's the correct way, and yes that part can be moved common function.

I also see that the documentation does not say what is returned by array_offset if nothing is found (it's documented in code but not in sgml).

rebased + fixed docs

Regards

Pavel



--
 Petr Jelinek                  http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Enforce creation of destination folders for source files in pg_regress (Was: pg_regress writes into source tree)
Следующее
От: Andres Freund
Дата:
Сообщение: Re: hash agg is slower on wide tables?