Skip site navigation (1) Skip section navigation (2)

Re: BUG #4509: array_cat's null behaviour is inconsistent

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Kevin Field <kev(at)brantaero(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4509: array_cat's null behaviour is inconsistent
Date: 2008-11-05 16:03:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Kevin Field wrote:
>> select array_cat(null::integer[], '{3}'::integer[]);
>> ...doesn't return NULL, which it should, for consistency.

> Doesn't make sense to me either.  I found that this was changed between 
> 8.1 (where it returns null) and 8.2, but I find nothing in the 
> respective release notes or commit messages about this change.  Tom?

Hm, I seem to have changed it in the patch that added support for nulls
within arrays, but I don't recall the reasoning for this detail ATM.

I'm loath to change just this one thing though.  If we're going to
monkey with it, I think we should start by having a thought-through
proposal about the behavior of all the array functions for corner
cases like null arrays and empty arrays (cf recent discussion about
zero-dimensional arrays).

			regards, tom lane

In response to


pgsql-bugs by date

Next:From: Keven GuindonDate: 2008-11-05 16:09:18
Subject: BUG #4512: PostgreSQL crash on update command
Previous:From: Tom LaneDate: 2008-11-05 15:33:16
Subject: Re: BUG #4510: memory leak with libpg.dll

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group