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

Commita053437

Browse files
committed
Dept of second thoughts: the IQ of estimate_array_length() needs to be
kept on par with that of scalararraysel(), else estimates that shouldtrack might not. Hence teach it about binary-compatible cases, too.
1 parentc2c0b31 commita053437

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/backend/utils/adt/selfuncs.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*
1717
* IDENTIFICATION
18-
* $PostgreSQL: pgsql/src/backend/utils/adt/selfuncs.c,v 1.222 2007/01/2801:37:38 tgl Exp $
18+
* $PostgreSQL: pgsql/src/backend/utils/adt/selfuncs.c,v 1.223 2007/01/2802:53:34 tgl Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -1698,6 +1698,9 @@ scalararraysel(PlannerInfo *root,
16981698
int
16991699
estimate_array_length(Node*arrayexpr)
17001700
{
1701+
/* look through any binary-compatible relabeling of arrayexpr */
1702+
arrayexpr=strip_array_coercion(arrayexpr);
1703+
17011704
if (arrayexpr&&IsA(arrayexpr,Const))
17021705
{
17031706
Datumarraydatum= ((Const*)arrayexpr)->constvalue;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp