Re: NULLs in array_cat vs array || array
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thom Brown <thom@linux.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-02-15T21:47:42Z
Lists: pgsql-hackers
Thom Brown <thom@linux.com> writes: > I assumed array_cat would behave similarly to array || array, but it > appears not when it comes to NULLs. Shouldn't these have identical > functionality? The attached patch makes it so, although it would > break existing code. That patch is the hard way: the right change would be to remove the code altogether and mark the function strict in pg_proc. However, the fact that it's not like that already shows that we went out of our way to make it so. I don't think we should undo that decision just because somebody submits a patch to do so. Also, so far as I can see array_cat *is* ||, so I'm not sure what discrepancy in behavior you're on about. regards, tom lane