Re: proposal: searching in array function - array_position

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: proposal: searching in array function - array_position
Дата
Msg-id 835.1426013419@sss.pgh.pa.us
обсуждение исходный текст
Ответ на 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
Pavel Stehule <pavel.stehule@gmail.com> writes:
> 2015-03-10 15:30 GMT+01:00 Robert Haas <robertmhaas@gmail.com>:
>> I am sure in agreement with the idea that it would be good to factor
>> out the common typecache code (for setting up my_extra).  Any chance
>> we get a preliminary patch that does that refactoring, and then rebase
>> the main patch on top of it?  I agree that it's not really this
>> patch's job to solve that problem, but it would be nice.

> The common part is following code:

There is not all that much commonality; many functions don't bother to
populate all of the ArrayMetaState fields because they don't need all of
them.  (The ones you quote don't, in fact.)  You are either going to end
up with a subroutine that does extra syscache lookups to populate the
whole struct every time, or a confusing collection of ad-hoc subroutines.
I'm not convinced that there's a lot of mileage to be gained here.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Precedence of standard comparison operators
Следующее
От: Robert Haas
Дата:
Сообщение: Re: proposal: disallow operator "=>" and use it for named parameters