aboutsummaryrefslogtreecommitdiff
path: root/src/fe_utils/string_utils.c
diff options
context:
space:
mode:
authorAndrew Gierth <rhodiumtoad@postgresql.org>2018-08-17 15:04:26 +0100
committerAndrew Gierth <rhodiumtoad@postgresql.org>2018-08-17 15:47:49 +0100
commit67b161eae32b0e900f74a2fe0b3f01667ca70850 (patch)
tree45823ef9b5fcca1cbbfab019874b3d0d3c5ed2d0 /src/fe_utils/string_utils.c
parent45d74631b3973390ff02cd765a674e6322e1c8db (diff)
downloadpostgresql-67b161eae32b0e900f74a2fe0b3f01667ca70850.tar.gz
postgresql-67b161eae32b0e900f74a2fe0b3f01667ca70850.zip
Set scan direction appropriately for SubPlans (bug #15336)
When executing a SubPlan in an expression, the EState's direction field was left alone, resulting in an attempt to execute the subplan backwards if it was encountered during a backwards scan of a cursor. Also, though much less likely, it was possible to reach the execution of an InitPlan while in backwards-scan state. Repair by saving/restoring estate->es_direction and forcing forward scan mode in the relevant places. Backpatch all the way, since this has been broken since 8.3 (prior to commit c7ff7663e, SubPlans had their own EStates rather than sharing the parent plan's, so there was no confusion over scan direction). Per bug #15336 reported by Vladimir Baranoff; analysis and patch by me, review by Tom Lane. Discussion: https://postgr.es/m/153449812167.1304.1741624125628126322@wrigleys.postgresql.org
Diffstat (limited to 'src/fe_utils/string_utils.c')
0 files changed, 0 insertions, 0 deletions