Re: array_to_string bug?
От | Tom Lane |
---|---|
Тема | Re: array_to_string bug? |
Дата | |
Msg-id | 14471.1258051602@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: array_to_string bug? (Robert Haas <robertmhaas@gmail.com>) |
Список | pgsql-hackers |
Robert Haas <robertmhaas@gmail.com> writes: > On Thu, Nov 12, 2009 at 1:28 PM, Steve Crawford > <scrawford@pinpointresearch.com> wrote: >> Although it might cause a fair amount of backward-compatibility trouble, the >> string representation could either use NULL to represent a null element as >> is allowed in other contexts or require that empty-string elements be >> represented as "" to differentiate ,"", (empty-string element) from ,, (null >> element). > That would cause a substantial amount of grief to people who might not > want that behavior, though. I use these functions for creating > human-readable output, not for serialization. Simple, predictable > behavior is very important. I agree --- we don't want to start introducing quoting rules into array_to_string. I think the viable alternatives are the current behavior, or treating a NULL element as if it were an empty string. David's idea that the entire output should go to NULL might be sane from a strict semantics point of view, but it also seems to make the function just about entirely useless in practice. regards, tom lane
В списке pgsql-hackers по дате отправления: