pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Selectively include window frames in expression walks/mutates. 7+ messages / 1 participants [nested] [flat]
* pgsql: Selectively include window frames in expression walks/mutates. @ 2019-10-03 10:52 Andrew Gierth <rhodiumtoad@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Andrew Gierth @ 2019-10-03 10:52 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Selectively include window frames in expression walks/mutates. query_tree_walker and query_tree_mutator were skipping the windowClause of the query, without regard for the fact that the startOffset and endOffset in a WindowClause node are expression trees that need to be processed. This was an oversight in commit ec4be2ee6 from 2010 which added the expression fields; the main symptom is that function parameters in window frame clauses don't work in inlined functions. Fix (as conservatively as possible since this needs to not break existing out-of-tree callers) and add tests. Backpatch all the way, since this has been broken since 9.0. Per report from Alastair McKinley; fix by me with kibitzing and review from Tom Lane. Discussion: https://postgr.es/m/DB6PR0202MB2904E7FDDA9D81504D1E8C68E3800@DB6PR0202MB2904.eurprd02.prod.outlook.c... Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/0a445f27909aedaf4ecc2efcb05c5d588c02e240 Modified Files -------------- src/backend/catalog/dependency.c | 9 +-- src/backend/nodes/nodeFuncs.c | 105 +++++++++++++++++++++++++++++++++++ src/include/nodes/nodeFuncs.h | 1 + src/test/regress/expected/window.out | 42 ++++++++++++++ src/test/regress/sql/window.sql | 19 +++++++ 5 files changed, 169 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Selectively include window frames in expression walks/mutates. @ 2019-10-03 10:52 Andrew Gierth <rhodiumtoad@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Andrew Gierth @ 2019-10-03 10:52 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Selectively include window frames in expression walks/mutates. query_tree_walker and query_tree_mutator were skipping the windowClause of the query, without regard for the fact that the startOffset and endOffset in a WindowClause node are expression trees that need to be processed. This was an oversight in commit ec4be2ee6 from 2010 which added the expression fields; the main symptom is that function parameters in window frame clauses don't work in inlined functions. Fix (as conservatively as possible since this needs to not break existing out-of-tree callers) and add tests. Backpatch all the way, since this has been broken since 9.0. Per report from Alastair McKinley; fix by me with kibitzing and review from Tom Lane. Discussion: https://postgr.es/m/DB6PR0202MB2904E7FDDA9D81504D1E8C68E3800@DB6PR0202MB2904.eurprd02.prod.outlook.c... Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/0b11dc01922b0f6376a27f84a34a52451e8f476c Modified Files -------------- src/backend/catalog/dependency.c | 9 +-- src/backend/nodes/nodeFuncs.c | 105 +++++++++++++++++++++++++++++++++++ src/include/nodes/nodeFuncs.h | 1 + src/test/regress/expected/window.out | 42 ++++++++++++++ src/test/regress/sql/window.sql | 19 +++++++ 5 files changed, 169 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Selectively include window frames in expression walks/mutates. @ 2019-10-03 10:52 Andrew Gierth <rhodiumtoad@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Andrew Gierth @ 2019-10-03 10:52 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Selectively include window frames in expression walks/mutates. query_tree_walker and query_tree_mutator were skipping the windowClause of the query, without regard for the fact that the startOffset and endOffset in a WindowClause node are expression trees that need to be processed. This was an oversight in commit ec4be2ee6 from 2010 which added the expression fields; the main symptom is that function parameters in window frame clauses don't work in inlined functions. Fix (as conservatively as possible since this needs to not break existing out-of-tree callers) and add tests. Backpatch all the way, since this has been broken since 9.0. Per report from Alastair McKinley; fix by me with kibitzing and review from Tom Lane. Discussion: https://postgr.es/m/DB6PR0202MB2904E7FDDA9D81504D1E8C68E3800@DB6PR0202MB2904.eurprd02.prod.outlook.c... Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d2427f11b28d7cb9a4a23dd230d5f7136d16aba4 Modified Files -------------- src/backend/catalog/dependency.c | 9 +-- src/backend/nodes/nodeFuncs.c | 105 +++++++++++++++++++++++++++++++++++ src/include/nodes/nodeFuncs.h | 1 + src/test/regress/expected/window.out | 42 ++++++++++++++ src/test/regress/sql/window.sql | 19 +++++++ 5 files changed, 169 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Selectively include window frames in expression walks/mutates. @ 2019-10-03 10:52 Andrew Gierth <rhodiumtoad@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Andrew Gierth @ 2019-10-03 10:52 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Selectively include window frames in expression walks/mutates. query_tree_walker and query_tree_mutator were skipping the windowClause of the query, without regard for the fact that the startOffset and endOffset in a WindowClause node are expression trees that need to be processed. This was an oversight in commit ec4be2ee6 from 2010 which added the expression fields; the main symptom is that function parameters in window frame clauses don't work in inlined functions. Fix (as conservatively as possible since this needs to not break existing out-of-tree callers) and add tests. Backpatch all the way, since this has been broken since 9.0. Per report from Alastair McKinley; fix by me with kibitzing and review from Tom Lane. Discussion: https://postgr.es/m/DB6PR0202MB2904E7FDDA9D81504D1E8C68E3800@DB6PR0202MB2904.eurprd02.prod.outlook.c... Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/b7a1c5539ad34d7357e04cc58f9c02a101482737 Modified Files -------------- src/backend/catalog/dependency.c | 9 +-- src/backend/nodes/nodeFuncs.c | 105 +++++++++++++++++++++++++++++++++++ src/include/nodes/nodeFuncs.h | 1 + src/test/regress/expected/window.out | 42 ++++++++++++++ src/test/regress/sql/window.sql | 19 +++++++ 5 files changed, 169 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Selectively include window frames in expression walks/mutates. @ 2019-10-03 10:52 Andrew Gierth <rhodiumtoad@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Andrew Gierth @ 2019-10-03 10:52 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Selectively include window frames in expression walks/mutates. query_tree_walker and query_tree_mutator were skipping the windowClause of the query, without regard for the fact that the startOffset and endOffset in a WindowClause node are expression trees that need to be processed. This was an oversight in commit ec4be2ee6 from 2010 which added the expression fields; the main symptom is that function parameters in window frame clauses don't work in inlined functions. Fix (as conservatively as possible since this needs to not break existing out-of-tree callers) and add tests. Backpatch all the way, since this has been broken since 9.0. Per report from Alastair McKinley; fix by me with kibitzing and review from Tom Lane. Discussion: https://postgr.es/m/DB6PR0202MB2904E7FDDA9D81504D1E8C68E3800@DB6PR0202MB2904.eurprd02.prod.outlook.c... Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/6db0d7f35917144fcd9dfbdad8c31c37a64ca144 Modified Files -------------- src/backend/catalog/dependency.c | 9 +-- src/backend/nodes/nodeFuncs.c | 105 +++++++++++++++++++++++++++++++++++ src/include/nodes/nodeFuncs.h | 1 + src/test/regress/expected/window.out | 42 ++++++++++++++ src/test/regress/sql/window.sql | 19 +++++++ 5 files changed, 169 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Selectively include window frames in expression walks/mutates. @ 2019-10-03 10:52 Andrew Gierth <rhodiumtoad@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Andrew Gierth @ 2019-10-03 10:52 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Selectively include window frames in expression walks/mutates. query_tree_walker and query_tree_mutator were skipping the windowClause of the query, without regard for the fact that the startOffset and endOffset in a WindowClause node are expression trees that need to be processed. This was an oversight in commit ec4be2ee6 from 2010 which added the expression fields; the main symptom is that function parameters in window frame clauses don't work in inlined functions. Fix (as conservatively as possible since this needs to not break existing out-of-tree callers) and add tests. Backpatch all the way, since this has been broken since 9.0. Per report from Alastair McKinley; fix by me with kibitzing and review from Tom Lane. Discussion: https://postgr.es/m/DB6PR0202MB2904E7FDDA9D81504D1E8C68E3800@DB6PR0202MB2904.eurprd02.prod.outlook.c... Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ede0ab6ccce498018e0b2112bcc2748a9799df40 Modified Files -------------- src/backend/catalog/dependency.c | 9 +-- src/backend/nodes/nodeFuncs.c | 105 +++++++++++++++++++++++++++++++++++ src/include/nodes/nodeFuncs.h | 1 + src/test/regress/expected/window.out | 42 ++++++++++++++ src/test/regress/sql/window.sql | 19 +++++++ 5 files changed, 169 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Selectively include window frames in expression walks/mutates. @ 2019-10-03 10:52 Andrew Gierth <rhodiumtoad@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Andrew Gierth @ 2019-10-03 10:52 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Selectively include window frames in expression walks/mutates. query_tree_walker and query_tree_mutator were skipping the windowClause of the query, without regard for the fact that the startOffset and endOffset in a WindowClause node are expression trees that need to be processed. This was an oversight in commit ec4be2ee6 from 2010 which added the expression fields; the main symptom is that function parameters in window frame clauses don't work in inlined functions. Fix (as conservatively as possible since this needs to not break existing out-of-tree callers) and add tests. Backpatch all the way, since this has been broken since 9.0. Per report from Alastair McKinley; fix by me with kibitzing and review from Tom Lane. Discussion: https://postgr.es/m/DB6PR0202MB2904E7FDDA9D81504D1E8C68E3800@DB6PR0202MB2904.eurprd02.prod.outlook.c... Branch ------ REL9_4_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/3473f81dd2a3491ad61be7d7f2917d2af70c423e Modified Files -------------- src/backend/catalog/dependency.c | 9 +-- src/backend/nodes/nodeFuncs.c | 105 +++++++++++++++++++++++++++++++++++ src/include/nodes/nodeFuncs.h | 1 + src/test/regress/expected/window.out | 42 ++++++++++++++ src/test/regress/sql/window.sql | 19 +++++++ 5 files changed, 169 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2019-10-03 10:52 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-10-03 10:52 pgsql: Selectively include window frames in expression walks/mutates. Andrew Gierth <rhodiumtoad@postgresql.org> 2019-10-03 10:52 pgsql: Selectively include window frames in expression walks/mutates. Andrew Gierth <rhodiumtoad@postgresql.org> 2019-10-03 10:52 pgsql: Selectively include window frames in expression walks/mutates. Andrew Gierth <rhodiumtoad@postgresql.org> 2019-10-03 10:52 pgsql: Selectively include window frames in expression walks/mutates. Andrew Gierth <rhodiumtoad@postgresql.org> 2019-10-03 10:52 pgsql: Selectively include window frames in expression walks/mutates. Andrew Gierth <rhodiumtoad@postgresql.org> 2019-10-03 10:52 pgsql: Selectively include window frames in expression walks/mutates. Andrew Gierth <rhodiumtoad@postgresql.org> 2019-10-03 10:52 pgsql: Selectively include window frames in expression walks/mutates. Andrew Gierth <rhodiumtoad@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox