Re: string_to_array with an empty input string

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: string_to_array with an empty input string
Дата
Msg-id AANLkTim+s9HP-ef4o58ToOVMrxBTAY966ykR4cam+Heg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: string_to_array with an empty input string  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 11 August 2010 21:52, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Peter Geoghegan <peter.geoghegan86@gmail.com> writes:
>> What's wrong with something like array_is_empty(anyarray) returns
>> boolean?
>
> What's that got to do with iterating over an array?

Only that I'm of the opinion that we'd be well served by more array
convenience functions, including convenience functions like the
proposed array_is_empty(), and, perhaps, functions that exist for the
express purpose of iterating over arrays more tersely in plpgsql.


> We could certainly
> provide it if it were commonly useful, but I'm not convinced of that.

Fair enough. I agree that it isn't *commonly* useful. I just don't
think that we're disadvantaged by being more inclusive, while still
bringing benefits to a minority of applications and users.


On 11 August 2010 23:06, Robert Haas <robertmhaas@gmail.com> wrote:
>> Iterating over an array is a simple thing. We should make simple things easy.
>
> I definitely agree that PL/pgsql could be more usable.  Or if not,
> then some other PL with a better overall design could be more usable.
> I am not entirely sure how to create such a thing, however.

Nor am I. However, I think that richer array manipulation facilities
are low-hanging fruit.

--
Regards,
Peter Geoghegan


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP)