]> granicus.if.org Git - postgresql/commit
Use context with correct lifetime in hypothetical_dense_rank_final.
authorAndres Freund <andres@anarazel.de>
Thu, 5 Jul 2018 00:36:01 +0000 (17:36 -0700)
committerAndres Freund <andres@anarazel.de>
Thu, 5 Jul 2018 00:36:01 +0000 (17:36 -0700)
commit249126e761e13c4d8e7519569d483eaeca7dac25
tree98378f971f9e49662e3da8364cd09598a9c34f2f
parent3a01f68e35a3584431ac5381c6ed75b1b39aaf2a
Use context with correct lifetime in hypothetical_dense_rank_final.

The query lifetime expression context created in
hypothetical_dense_rank_final() was buggily allocated in the calling
memory context. I (Andres) broke that in bf6c614a2f2.

Reported-By: Rajkumar Raghuwanshi
Author: Amit Langote
Discussion:  https://postgr.es/m/CAKcux6kmzWmur5HhA_aU6gYVFu0RLQdgJJ+aC9SLdcOvBSrpfA@mail.gmail.com
Backpatch: 11-
src/backend/utils/adt/orderedsetaggs.c
src/test/regress/expected/aggregates.out
src/test/regress/sql/aggregates.sql