aboutsummaryrefslogtreecommitdiff
path: root/src/backend/jit/llvm/llvmjit_expr.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-10-02 11:05:05 +0900
committerMichael Paquier <michael@paquier.xyz>2023-10-02 11:05:05 +0900
commit2940f1c8373cb3b43b3b42d40786b05d6e901de1 (patch)
treeb18c63d3a11e1f6e17e9d7d35e423d62d822ae72 /src/backend/jit/llvm/llvmjit_expr.c
parente1f95ec8cf6ea75d90905b2c746e2e1e9f3c9fc1 (diff)
downloadpostgresql-2940f1c8373cb3b43b3b42d40786b05d6e901de1.tar.gz
postgresql-2940f1c8373cb3b43b3b42d40786b05d6e901de1.zip
psql: Set variables from query result on failure when printing tuples
SetResultVariables() was not getting called when "printing" a result that failed (see around PrintQueryResult), which would cause some variables to not be set, like ROW_COUNT, SQLSTATE or ERROR. This can be confusing as a previous result would be retained. This state could be reached when failing to process tuples in a few commands, like \gset when it returns no tuples, or \crosstabview. A test is added, based on \gset. This is arguably a bug fix, but no backpatch is done as there is a risk of breaking scripts that rely on the previous behavior, even if they do so accidentally. Reported-by: amutu Author: Japin Li Reviewed-by: Tom Lane, Michael Paquier Discussion: https://postgr.es/m/18134-87126d90cb4dd049@postgresql.org
Diffstat (limited to 'src/backend/jit/llvm/llvmjit_expr.c')
0 files changed, 0 insertions, 0 deletions