Re: string_to_array with an empty input string

From: Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Greg Stark <gsstark(at)mit(dot)edu>, Thom Brown <thom(at)linux(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: string_to_array with an empty input string
Date: 2010-08-11 17:32:53
Message-ID: AANLkTikp4LP2TJnJHocp4qGbzhvYAqZWa7Tf36Votr+a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Yeah, I think David's examples are talking about the behavior of join,
> but we're trying to decide what split should do.  I think the main
> argument for making it return NULL is that you can then fairly easily
> use COALESCE() to get whatever you want.  That's a bit more difficult
> if you use return any other value.

I think that there's a need for additional built-in array functions,
including one to succinctly test if an array has no elements.
Iterating through an array with plpgsql, for example, is more clunky
than it should be.

--
Regards,
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2010-08-11 17:49:12 Re: string_to_array with an empty input string
Previous Message Greg Smith 2010-08-11 16:49:05 Re: MERGE command for inheritance