Search Postgresql Archives

Re: [HACKERS] string_to_array with empty input

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Apr 1, 2009, at 10:09 AM, Tom Lane wrote:

Thus, this is not a problem with string_to_array(), but a
casting problem from text[] to int[].

Nonsense. The question is whether string_to_array is meant to be useful
for lists of anything except text.  I agree you could argue that it
isn't.  But even in the domain of text it's not all that cut-and-dried
whether string_to_array should return array[] or array[''] for empty
input. So ISTM we're giving up less than we gain by choosing the former.

Yeah. I'm okay with either, as long as it's consistent. I have a mild preference for '{""}', but I can live with ARRAY[] instead. As long as it's not NULL that gets returned.

Best,

David

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux