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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-bugs by date

  From Date Subject
Next Message Josh Berkus 2009-01-13 18:34:49 Re: [BUGS] Status of issue 4593
Previous Message Kevin Grittner 2009-01-13 18:18:40 Re: [BUGS] Status of issue 4593