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

Re: Proposed patch for contrib/cube

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2006-07-17 22:46:51
Subject: Re: src/tools/pginclude considered harmful (was Re:
Previous:From: Marc G. FournierDate: 2006-07-17 22:37:41
Subject: Re: plPHP and plRuby

pgsql-patches by date

Next:From: Tom LaneDate: 2006-07-17 22:46:51
Subject: Re: src/tools/pginclude considered harmful (was Re:
Previous:From: Neil ConwayDate: 2006-07-17 22:24:46
Subject: Re: Proposed patch for contrib/cube

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