Re: Proposal: generate_iterator functions

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Proposal: generate_iterator functions
Дата
Msg-id
27004.1192734531@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Proposal: generate_iterator functions "Pavel Stehule" <pavel.stehule@gmail.com>
Re: Proposal: generate_iterator functions "Merlin Moncure" <mmoncure@gmail.com>
Re: Proposal: generate_iterator functions "Pavel Stehule" <pavel.stehule@gmail.com>
Re: Proposal: generate_iterator functions "Pavel Stehule" <pavel.stehule@gmail.com>
Re: Proposal: generate_iterator functions Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposal: generate_iterator functions "Pavel Stehule" <pavel.stehule@gmail.com>
Re: Proposal: generate_iterator functions "Merlin Moncure" <mmoncure@gmail.com>
Re: Proposal: generate_iterator functions Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposal: generate_iterator functions Joe Conway <mail@joeconway.com>
Re: Proposal: generate_iterator functions "Merlin Moncure" <mmoncure@gmail.com>
Re: Proposal: generate_iterator functions Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposal: generate_iterator functions "Merlin Moncure" <mmoncure@gmail.com>
Re: Proposal: generate_iterator functions "Pavel Stehule" <pavel.stehule@gmail.com>
Re: Proposal: generate_iterator functions Bruce Momjian <bruce@momjian.us>
"Merlin Moncure"  writes:
> On 10/18/07, Tom Lane  wrote:
>> generate_array_subscripts() maybe?

> array_to_set or array_expand seem a little better imo (shorter, and
> symmetry with array_accum()), unless you want to differentiate between
> internal funcs (array_cat and the like) vs. user funcs.

I don't much like either of those, because they seem misleading:
what I'd expect from a function named that way is that it returns
the *elements* of the array, not their subscripts.

Come to think of it, do we have a way of doing that directly?  If you
only care about accessing the array elements, it seems like dealing in
the subscripts is just notational tedium.  Perhaps there should be
array_expand(anyarray) returns setof anyelement, in addition to the
subscript generation function.

On the question of being too long, I could live with
generate_subscripts().
		regards, tom lane

В списке pgsql-hackers по дате отправления
От: Merlin Moncure
Дата:
От: Boergesson, Cheryl
Дата:
FAQ