summaryrefslogtreecommitdiff
path: root/src/backend/optimizer/path/costsize.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-02-16 02:30:39 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-02-16 02:30:39 +0000
commit51972a9d5d068dd34b24ff4923981ffb90e5cc2d (patch)
treec68fddbb3eaafbd332e84afbafe3c171f6372d4e /src/backend/optimizer/path/costsize.c
parentde25638d2fbe9e56ecfc60a7dda8a0c56028317a (diff)
COALESCE() and NULLIF() are now first-class expressions, not macros
that turn into CASE expressions. They evaluate their arguments at most once. Patch by Kris Jurka, review and (very light) editorializing by me.
Diffstat (limited to 'src/backend/optimizer/path/costsize.c')
-rw-r--r--src/backend/optimizer/path/costsize.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index 54e47e24243..21bc152ce6e 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -49,7 +49,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.106 2003/02/15 21:39:58 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.107 2003/02/16 02:30:38 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1468,7 +1468,8 @@ cost_qual_eval_walker(Node *node, QualCost *total)
*/
if (IsA(node, FuncExpr) ||
IsA(node, OpExpr) ||
- IsA(node, DistinctExpr))
+ IsA(node, DistinctExpr) ||
+ IsA(node, NullIfExpr))
{
total->per_tuple += cpu_operator_cost;
}