aboutsummaryrefslogtreecommitdiff
path: root/src/backend/libpq/be-gssapi-common.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-06-22 17:48:39 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-06-22 17:48:39 -0400
commit29d5d5761aa8695e1226f1f76b7f76a2a4b195a0 (patch)
treeb138f22d8250eb7e8ce9809d4dd44ca266ce59f3 /src/backend/libpq/be-gssapi-common.c
parentc58a41605ffabe8e4184b4c3b2d919638cd3357d (diff)
downloadpostgresql-29d5d5761aa8695e1226f1f76b7f76a2a4b195a0.tar.gz
postgresql-29d5d5761aa8695e1226f1f76b7f76a2a4b195a0.zip
Restore the portal-level snapshot for simple expressions, too.
Commits 84f5c2908 et al missed the need to cover plpgsql's "simple expression" code path. If the first thing we execute after a COMMIT/ROLLBACK is one of those, rather than a full-fledged SPI command, we must explicitly do EnsurePortalSnapshotExists() to make sure we have an outer snapshot. Note that it wouldn't be good enough to just push a snapshot for the duration of the expression execution: what comes back might be toasted, so we'd better have a snapshot protecting it. The test case demonstrating this fact cheats a bit by marking a SQL function immutable even though it fetches from a table. That's nothing that users haven't been seen to do, though. Per report from Jim Nasby. Back-patch to v11, like the previous fix. Discussion: https://postgr.es/m/378885e4-f85f-fc28-6c91-c4d1c080bf26@amazon.com
Diffstat (limited to 'src/backend/libpq/be-gssapi-common.c')
0 files changed, 0 insertions, 0 deletions