mirror of
https://github.com/postgres/postgres.git
synced 2026-02-12 15:23:16 -05:00
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. |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| archive.c | ||
| astreamer_file.c | ||
| astreamer_gzip.c | ||
| astreamer_lz4.c | ||
| astreamer_tar.c | ||
| astreamer_zstd.c | ||
| cancel.c | ||
| conditional.c | ||
| connect_utils.c | ||
| Makefile | ||
| mbprint.c | ||
| meson.build | ||
| option_utils.c | ||
| parallel_slot.c | ||
| print.c | ||
| psqlscan.l | ||
| query_utils.c | ||
| recovery_gen.c | ||
| simple_list.c | ||
| string_utils.c | ||