Re: NULLs in array_cat vs array || array - Mailing list pgsql-hackers

From Tom Lane
Subject Re: NULLs in array_cat vs array || array
Date
Msg-id 11693.1297806462@sss.pgh.pa.us
Whole thread Raw
In response to NULLs in array_cat vs array || array  (Thom Brown <thom@linux.com>)
Responses Re: NULLs in array_cat vs array || array  (Thom Brown <thom@linux.com>)
List 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


pgsql-hackers by date:

Previous
From: Cédric Villemain
Date:
Subject: Re: NULLs in array_cat vs array || array
Next
From: Dimitri Fontaine
Date:
Subject: Re: Extensions vs PGXS' MODULE_PATHNAME handling