Commit 257b4d09 authored by Bruce Momjian's avatar Bruce Momjian

Change new assert so it generates assert message rather than SIGSEG.

parent 9d9eadea
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.3 1996/10/05 20:31:38 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.4 1996/10/07 02:50:19 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -231,7 +231,12 @@ ExecEvalVar(Var *variable, ExprContext *econtext, bool *isNull) ...@@ -231,7 +231,12 @@ ExecEvalVar(Var *variable, ExprContext *econtext, bool *isNull)
attnum = variable->varattno; attnum = variable->varattno;
/* (See prolog for explanation of this Assert) */ /* (See prolog for explanation of this Assert) */
Assert(attnum <= 0 || Assert(attnum < 0 ||
(tuple_type->attrs[attnum-1] != NULL &&
variable->vartype == tuple_type->attrs[attnum-1]->atttypid))
/*
* If the attribute number is invalid, then we are supposed to
variable->vartype == tuple_type->attrs[attnum-1]->atttypid) variable->vartype == tuple_type->attrs[attnum-1]->atttypid)
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment