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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Kevin Field <kev(at)brantaero(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4509: array_cat's null behaviour is inconsistent
Date: 2009-01-08 21:53:46
Message-ID: 200901082153.n08LrkD19821@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


Added to TODO:

Improve handling of NULLs in arrays

* http://archives.postgresql.org/pgsql-bugs/2008-11/msg00009.php

---------------------------------------------------------------------------

Kevin Field wrote:
>
> The following bug has been logged online:
>
> Bug reference: 4509
> Logged by: Kevin Field
> Email address: kev(at)brantaero(dot)com
> PostgreSQL version: 8.3.4
> Operating system: Windows Server 2003 SP2
> Description: array_cat's null behaviour is inconsistent
> Details:
>
> Section 9.2 in the docs say, 'The ordinary comparison operators yield null
> (signifying "unknown") when either input is null.' This applies to other
> operators too. For example, the result of tacking an unknown value onto a
> known one is unknown, because you don't know what exactly you just tacked
> on. So
>
> select null::text || 'hello';
>
> ...returns NULL, which makes sense. But then this
>
> select array_cat(null::integer[], '{3}'::integer[]);
>
> ...doesn't return NULL, which it should, for consistency.
>
> Kev
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message tiagoemerick 2009-01-09 01:39:21 Re: Installation problem "...The database cluster initialization failed.."
Previous Message Tom Lane 2009-01-08 20:38:49 Re: PANIC: failed to re-find parent key in "100924" for split pages 1606/1673