Re: string_to_array with an empty input string
От | David E. Wheeler |
---|---|
Тема | Re: string_to_array with an empty input string |
Дата | |
Msg-id | 4455DAAC-40AF-42B3-8AE8-7710C224A01C@kineticode.com обсуждение исходный текст |
Ответ на | Re: string_to_array with an empty input string (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: string_to_array with an empty input string
|
Список | pgsql-hackers |
On Aug 11, 2010, at 7:41 AM, Tom Lane wrote: > I had forgotten that discussion. It looks like we trailed off without > any real consensus: there was about equal sentiment for an array with > zero elements and an array with one empty-string element. We ended > up leaving it alone because (a) that wouldn't break anything and (b) > you could use COALESCE() to substitute whichever behavior your > application needed for the case. > > So maybe we need to revisit the issue. Pavel was claiming that > switching to a zero-element array result was a no-brainer, but evidently > it isn't so. Is anybody still excited about the alternatives? % perl -E 'say q{"}, join(",", ""), q{"}' "" % ruby -e 'puts %q{"} + [""].join(",") + %q{"}' "" % python -c 'print "\"" + ",".join([""]) + "\""' "" I believe those are all "", rather than '"' + undef + '"'. Best, David
В списке pgsql-hackers по дате отправления: