Tom Lane wrote:
I agree this seems less than consistent though, especially seeing
that you *don't* get a null for a zero-length separator, which if
anything is a more poorly defined case.

I doubt it'd be a good idea to back-patch a change for this,
but I could see altering the definition for 8.4.

Does anyone want to argue for keeping it the same?  Or perhaps
argue that a zero-element array is a more sensible result than
a one-element array with one empty string?  (It doesn't seem
like it to me, but maybe somebody thinks so.)

                        regards, tom lane

I like the array to contain single zero length string. A string was passed in although empty, its still a string not a NULL. Returning an empty array implies nothing was passed to the function although something was. That seems kinda odd to me also, give back what was sent in broken into an array.

I use this and split_part allot in our database to break apart  part numbers


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to