]> granicus.if.org Git - postgresql/commitdiff
Change new assert so it generates assert message rather than SIGSEG.
authorBruce Momjian <bruce@momjian.us>
Mon, 7 Oct 1996 02:50:19 +0000 (02:50 +0000)
committerBruce Momjian <bruce@momjian.us>
Mon, 7 Oct 1996 02:50:19 +0000 (02:50 +0000)
src/backend/executor/execQual.c

index d172b3d9f01c6f6001fdb9288fc3e8f11c856f7e..734c62a147d80d771e8c622bc5b2cdeb8b4646ba 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * 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)
     attnum =   variable->varattno;
 
     /* (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)
     
     /*