Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA08693 for ; Tue, 14 Sep 1999 11:05:46 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id LAA16390; Tue, 14 Sep 1999 11:02:13 -0400 (EDT) To: Michael Richards cc: pgsql-sql@postgreSQL.org Subject: Re: [SQL] Array Madness In-reply-to: Your message of Mon, 13 Sep 1999 22:56:28 -0300 (ADT) Date: Tue, 14 Sep 1999 11:02:13 -0400 Message-ID: <16388.937321333@sss.pgh.pa.us> From: Tom Lane Michael Richards writes: > It seems that you can't have a NULL value in an array. Seems like a reasonable idea. Go for it... > Running an update and setting a single array value to null seems > to nuke the entire array. Yeah, it does, see ExecEvalArrayRef() in execQual.c: if the refassgnexpr yields a null, it just drops out with a null result for the whole expr. This could be fixed if the array routines had a representation for a null element in an array, but they don't. In the meantime, perhaps it would be better for ExecEvalArrayRef() to raise an error if the assign source is null, rather than dropping the whole contents of the array. Comments? regards, tom lane