|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $PostgreSQL: pgsql/src/backend/optimizer/util/clauses.c,v 1.229 2007/01/10 18:06:04 tgl Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/backend/optimizer/util/clauses.c,v 1.230 2007/01/17 17:25:52 tgl Exp $ |
12 | 12 | * |
13 | 13 | * HISTORY |
14 | 14 | * AUTHORDATEMAJOR EVENT |
@@ -1073,6 +1073,12 @@ is_strict_saop(ScalarArrayOpExpr *expr, bool falseOK) |
1073 | 1073 | * may vary from one statement to the next.However, the expr's value |
1074 | 1074 | * will be constant over any one scan of the current query, so it can be |
1075 | 1075 | * used as, eg, an indexscan key. |
| 1076 | + * |
| 1077 | + * CAUTION: this function omits to test for one very important class of |
| 1078 | + * not-constant expressions, namely aggregates (Aggrefs). In current usage |
| 1079 | + * this is only applied to WHERE clauses and so a check for Aggrefs would be |
| 1080 | + * a waste of cycles; but be sure to also check contain_agg_clause() if you |
| 1081 | + * want to know about pseudo-constness in other contexts. |
1076 | 1082 | */ |
1077 | 1083 | bool |
1078 | 1084 | is_pseudo_constant_clause(Node*clause) |
|