Re: string_to_array, array_to_string function without separator
От | Chapman Flack |
---|---|
Тема | Re: string_to_array, array_to_string function without separator |
Дата | |
Msg-id | 64cde08f-133c-d2c4-3874-ca4e79962c07@anastigmatix.net обсуждение исходный текст |
Ответ на | Re: string_to_array, array_to_string function without separator (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: string_to_array, array_to_string function without separator
|
Список | pgsql-hackers |
On 3/15/19 12:15 PM, Tom Lane wrote: > Chapman Flack <chap@anastigmatix.net> writes: >> So the proposal seems roughly equivalent to making string_to_array's >> second parameter optional default null, and array_to_string's second >> parameter optional default ''. > > In that case why bother? It'll just create a cross-version compatibility > hazard for next-to-no keystroke savings. If the cases were so common > that they could be argued to be sane "default" behavior, I might feel > differently --- but if you were asked in a vacuum what the default > delimiters ought to be, I don't think you'd say "no delimiter". One could go further and argue that the non-optional arguments improve clarity: a reader seeing the explicit NULL or '' argument gets a strong clue what's intended, who in the optional-argument case might end up thinking "must go look up what this function's default delimiter is". -Chap
В списке pgsql-hackers по дате отправления: