Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rowley2022-08-04 22:14:00 +0000
committerDavid Rowley2022-08-04 22:14:00 +0000
commit53823a06be6f40d88d8e3ba45045ecee1a21fc5e (patch)
treee2074dcd8a3b72cde8e52e252c78fdd210b6c3f3 /src/backend
parentcf112c122060568aa06efe4e6e6fb9b2dd4f1090 (diff)
Fix failure to set correct operator in window run condition
This was a simple omission in 9d9c02ccd where the code didn't correctly set the operator to use in the run condition OpExpr when the window function was both monotonically increasing and decreasing. Bug discovered by Julien Roze, although he did not report it. Reported-by: Phil Florent Discussion: https://postgr.es/m/PA4P191MB160009A09B9D0624359278CFBA9F9@PA4P191MB1600.EURP191.PROD.OUTLOOK.COM Backpatch-through: 15, where 9d9c02ccd was added
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/optimizer/path/allpaths.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c
index b23cc8ee82d..8fc28007f54 100644
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -2306,6 +2306,7 @@ find_window_run_conditions(Query *subquery, RangeTblEntry *rte, Index rti,
{
*keep_original = false;
runopexpr = opexpr;
+ runoperator = opexpr->opno;
break;
}