summaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_expr.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2025-11-04 20:12:48 +0900
committerMichael Paquier <michael@paquier.xyz>2025-11-04 20:12:48 +0900
commit861af9261035cec7408040d646cba92959ba6f13 (patch)
treeb1766f2a5c6fdc006ee37745225b97b3d68e70c8 /src/backend/parser/parse_expr.c
parentad1581d7feaeb1d78a0858703dac1bcb52f600d8 (diff)
libpq: Improve error handling in passwordFromFile()
Previously, passwordFromFile() returned NULL for valid cases (like no matching password found) and actual errors (two out-of-memory paths). This made it impossible for its sole caller, pqConnectOptions2(), to distinguish between these scenarios and fail the connection appropriately should an out-of-memory error occur. This patch extends passwordFromFile() to be able to detect both valid and failure cases, with an error string given back to the caller of the function. Out-of-memory failures unlikely happen in the field, so no backpatch is done. Author: Joshua Shanks <jjshanks@gmail.com> Discussion: https://postgr.es/m/CAOxqWDfihFRmhNVdfu8epYTXQRxkCHSOrg+=-ij2c_X3gW=o3g@mail.gmail.com
Diffstat (limited to 'src/backend/parser/parse_expr.c')
0 files changed, 0 insertions, 0 deletions