aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/array_userfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2025-03-31 12:16:10 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2025-03-31 12:16:32 -0400
commit2fd3e2fa5c908d05ac4d8b6c2c80fd50c506f32e (patch)
treeb89f702348196d3f904984499b349d38ff42a26a /src/backend/utils/adt/array_userfuncs.c
parent0fcf02ad456862d8523a1918e2882e7697a52896 (diff)
downloadpostgresql-2fd3e2fa5c908d05ac4d8b6c2c80fd50c506f32e.tar.gz
postgresql-2fd3e2fa5c908d05ac4d8b6c2c80fd50c506f32e.zip
Fix accidentally-harmless thinko in psqlscan_test_variable().
This code was passing literal strings to psqlscan_emit, which is quite contrary to that function's specification: "If you pass it something that is not part of the yytext string, you are making a mistake". It accidentally worked anyway, even in non-safe_encoding mode. psqlscan_emit would compute a garbage "reference" pointer, but would never dereference that since the passed string is all-ASCII. So there's no live bug today, but that is a happenstance outcome of psqlscan_emit's current implementation. Let's make psqlscan_test_variable do what it's supposed to, namely append directly to the output buffer. This is just future-proofing against possible changes in psqlscan_emit, so I don't feel a need to back-patch.
Diffstat (limited to 'src/backend/utils/adt/array_userfuncs.c')
0 files changed, 0 insertions, 0 deletions