Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc81bfc2

Browse files
committed
Add a note pointing out that is_pseudo_constant_clause() doesn't check
for aggregates. This is OK for current uses but could burn somebodysomeday...
1 parenteddbf39 commitc81bfc2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎src/backend/optimizer/util/clauses.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* 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 $
1212
*
1313
* HISTORY
1414
* AUTHORDATEMAJOR EVENT
@@ -1073,6 +1073,12 @@ is_strict_saop(ScalarArrayOpExpr *expr, bool falseOK)
10731073
* may vary from one statement to the next.However, the expr's value
10741074
* will be constant over any one scan of the current query, so it can be
10751075
* 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.
10761082
*/
10771083
bool
10781084
is_pseudo_constant_clause(Node*clause)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp