Re: string_to_array with an empty input string - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: string_to_array with an empty input string
Date
Msg-id AANLkTikp4LP2TJnJHocp4qGbzhvYAqZWa7Tf36Votr+a@mail.gmail.com
Whole thread Raw
In response to Re: string_to_array with an empty input string  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: string_to_array with an empty input string  (Robert Haas <robertmhaas@gmail.com>)
List 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


pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: MERGE command for inheritance
Next
From: "David E. Wheeler"
Date:
Subject: Re: string_to_array with an empty input string