From a409f40ea8d1bbf028d0d472f303518db531676c Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Mon, 7 Oct 1996 19:53:15 +0000 Subject: [PATCH] Modified Assert to be more selective. --- src/backend/executor/execQual.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/backend/executor/execQual.c b/src/backend/executor/execQual.c index 734c62a147..ad59d28d92 100644 --- a/src/backend/executor/execQual.c +++ b/src/backend/executor/execQual.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.4 1996/10/07 02:50:19 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.5 1996/10/07 19:53:15 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -231,8 +231,9 @@ ExecEvalVar(Var *variable, ExprContext *econtext, bool *isNull) attnum = variable->varattno; /* (See prolog for explanation of this Assert) */ - Assert(attnum < 0 || - (tuple_type->attrs[attnum-1] != NULL && + Assert(attnum <= 0 || + (attnum - 1 <= tuple_type->natts - 1 && + tuple_type->attrs[attnum-1] != NULL && variable->vartype == tuple_type->attrs[attnum-1]->atttypid)) /*