[HACKERS] array_to_string bug?

2009-11-12 Thread David Fetter
Folks, Here's expected behavior: davidfet...@postgres=# SELECT array(values(1),(null)); ?column? ── {1,NULL} (1 row) The next one is just plain unexpected. Either it's a bug, or it needs more documentation in the function description in the docs, \df+ output, etc.

Re: [HACKERS] array_to_string bug?

2009-11-12 Thread Tom Lane
David Fetter da...@fetter.org writes: The next one is just plain unexpected. array_to_string ignores null elements. What do you think it should do with them? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to

Re: [HACKERS] array_to_string bug?

2009-11-12 Thread David Fetter
On Thu, Nov 12, 2009 at 11:20:26AM -0500, Tom Lane wrote: David Fetter da...@fetter.org writes: The next one is just plain unexpected. array_to_string ignores null elements. What do you think it should do with them? It should concatenate them, i.e. return a NULL if the array includes any

Re: [HACKERS] array_to_string bug?

2009-11-12 Thread Steve Crawford
Tom Lane wrote: David Fetter da...@fetter.org writes: The next one is just plain unexpected. array_to_string ignores null elements. What do you think it should do with them? regards, tom lane This seems somewhat related to the long-running discussion from

Re: [HACKERS] array_to_string bug?

2009-11-12 Thread Robert Haas
On Thu, Nov 12, 2009 at 1:28 PM, Steve Crawford scrawf...@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

Re: [HACKERS] array_to_string bug?

2009-11-12 Thread David Fetter
On Thu, Nov 12, 2009 at 01:33:41PM -0500, Robert Haas wrote: On Thu, Nov 12, 2009 at 1:28 PM, Steve Crawford scrawf...@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

Re: [HACKERS] array_to_string bug?

2009-11-12 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Thu, Nov 12, 2009 at 1:28 PM, Steve Crawford scrawf...@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

Re: [HACKERS] array_to_string bug?

2009-11-12 Thread David E. Wheeler
On Nov 12, 2009, at 10:46 AM, David Fetter wrote: My question boils down to, why is this string concatenation different from all other string concatenations? Does it have something to do with afikoman? David -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] array_to_string bug?

2009-11-12 Thread David Fetter
On Thu, Nov 12, 2009 at 11:46:54AM -0800, David Wheeler wrote: On Nov 12, 2009, at 10:46 AM, David Fetter wrote: My question boils down to, why is this string concatenation different from all other string concatenations? Does it have something to do with afikoman? I was wondering who'd