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

Re: BUG #4613: intarray_del_elem returns an invalid empty array (for nullif comparison)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Valentine Gogichashvili" <valgog(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4613: intarray_del_elem returns an invalid empty array (for nullif comparison)
Date: 2009-01-13 18:22:04
Message-ID: 28991.1231870924@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Valentine Gogichashvili" <valgog(at)gmail(dot)com> writes:
> When contrib/intarray module - operation (intarray_del_elem) returns an
> empty array, is not supposed to be empty 

This isn't really contrib/intarray's fault, it's a symptom of the
general question of what an "empty" array is.  See thread here:
http://archives.postgresql.org/pgsql-hackers/2008-10/msg01033.php

Given the lack of consensus about how to change the behavior, I wouldn't
recommend holding your breath waiting for a fix --- and in any case
we'd not likely risk back-patching any such change.  Instead of testing
for equality to '{}' you'd probably be better off testing the array
dimensions, as suggested here:
http://archives.postgresql.org/pgsql-general/2008-10/msg00920.php

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Josh BerkusDate: 2009-01-13 18:34:49
Subject: Re: [BUGS] Status of issue 4593
Previous:From: Kevin GrittnerDate: 2009-01-13 18:18:40
Subject: Re: [BUGS] Status of issue 4593

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