From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org, Joshua Reich <josh(at)root(dot)net> |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: Proposed patch for contrib/cube |
Date: | 2006-07-17 22:41:26 |
Message-ID: | 8960.1153176086@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Joshua Reich <josh(at)root(dot)net> writes:
>> if (PG_ARGISNULL(0) || PG_ARGISNULL(1))
>> {
>> ereport(ERROR,
>> (errcode(ERRCODE_ARRAY_ELEMENT_ERROR),
>> errmsg("Cannot work with NULL arrays")));
>> }
This is useless code if the function is declared STRICT, as C functions
most often are. What you *do* need to be checking is ARR_HASNULL(),
since there isn't anything very useful you can do with null elements
within the arrays.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-07-17 22:46:51 | Re: src/tools/pginclude considered harmful (was Re: |
Previous Message | Marc G. Fournier | 2006-07-17 22:37:41 | Re: plPHP and plRuby |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-07-17 22:46:51 | Re: src/tools/pginclude considered harmful (was Re: |
Previous Message | Neil Conway | 2006-07-17 22:24:46 | Re: Proposed patch for contrib/cube |