Re: NULL safe equality operator

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Michael Glaesemann <grzm(at)myrealbox(dot)com>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: NULL safe equality operator
Date: 2005-11-25 15:23:41
Message-ID: 22284.1132932221@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
>> test=# select null_safe_cmp (NULL,NULL);
>> ERROR: could not determine anyarray/anyelement type because input has
>> type "unknown"
>> Same casting problem due to anyelement, of course.

> Yes - I wonder what the trick to getting around that is?

You might be able to hack it by creating a second function defined as
null_safe_cmp(unknown,unknown)
Pretty grotty of course, and I'm not sure that it comes up in the
real world as opposed to test cases.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-11-25 15:25:15 Re: NULL safe equality operator
Previous Message Tom Lane 2005-11-25 15:20:11 Re: gprof SELECT COUNT(*) results