*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.135 2003/07/21 17:05:08 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.137 2003/07/30 19:02:18 tgl Exp $
*
*-------------------------------------------------------------------------
*/
Datum retval;
if (!AttributeNumberIsValid(attrno))
- elog(ERROR, "invalid attribute number: %d", attrno);
+ elog(ERROR, "invalid attribute number %d", attrno);
if (isNull == (bool *) NULL)
elog(ERROR, "a NULL isNull pointer was passed");
/* Safety check (should never fail, as parser should check sooner) */
if (length(fcache->args) > FUNC_MAX_ARGS)
- elog(ERROR, "too many arguments to function");
+ elog(ERROR, "too many arguments");
/* Set up the primary fmgr lookup information */
fmgr_info_cxt(foid, &(fcache->func), fcacheCxt);
/* ----------------------------------------------------------------
* ExecEvalArray - ARRAY[] expressions
+ *
+ * NOTE: currently, if any input value is NULL then we return a NULL array,
+ * so the ARRAY[] construct can be considered strict. Eventually this will
+ * change; when it does, be sure to fix contain_nonstrict_functions().
* ----------------------------------------------------------------
*/
static Datum
dvalues[i++] = ExecEvalExpr(e, econtext, &eisnull, NULL);
if (eisnull)
- ereport(ERROR,
- (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED),
- errmsg("arrays cannot have NULL elements")));
+ {
+ *isNull = true;
+ return (Datum) 0;
+ }
}
/* setup for 1-D array of the given length */
arraydatum = ExecEvalExpr(e, econtext, &eisnull, NULL);
if (eisnull)
- ereport(ERROR,
- (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED),
- errmsg("arrays cannot have NULL elements")));
+ {
+ *isNull = true;
+ return (Datum) 0;
+ }
array = DatumGetArrayTypeP(arraydatum);