*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.97 2003/08/08 21:41:50 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.97.4.1 2004/05/11 13:15:23 tgl Exp $
*
*-------------------------------------------------------------------------
*/
case T_Sort:
case T_Unique:
case T_SetOp:
- case T_Limit:
/*
* These plan types don't actually bother to evaluate their
* the plan tree!
*/
break;
+ case T_Limit:
+ /*
+ * Like the plan types above, Limit doesn't evaluate its
+ * tlist or quals. It does have live expressions for
+ * limit/offset, however.
+ */
+ fix_expr_references(plan, ((Limit *) plan)->limitOffset);
+ fix_expr_references(plan, ((Limit *) plan)->limitCount);
+ break;
case T_Agg:
case T_Group:
set_uppernode_references(plan, (Index) 0);
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/subselect.c,v 1.83.2.1 2003/11/25 23:59:32 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/subselect.c,v 1.83.2.2 2004/05/11 13:15:23 tgl Exp $
*
*-------------------------------------------------------------------------
*/
&context);
break;
+ case T_Limit:
+ finalize_primnode(((Limit *) plan)->limitOffset,
+ &context);
+ finalize_primnode(((Limit *) plan)->limitCount,
+ &context);
+ break;
+
case T_Hash:
finalize_primnode((Node *) ((Hash *) plan)->hashkeys,
&context);
case T_Sort:
case T_Unique:
case T_SetOp:
- case T_Limit:
case T_Group:
break;