v.20.5Improvement

Fix Multiline Query Logging for String Literals, Identifiers, and Comments

When multiline query is printed to server log, the lines are joined. Make it to work correct in case of multiline string literals, identifiers and single-line comments. This fixes #3853. #11686 (alexey-milovidov).
Improved logging of multiline queries by correctly preserving line breaks in multiline string literals, identifiers, and single-line comments.

Why it matters

Prior to this change, multiline queries were logged with lines joined together, which made logs hard to read and debug. This fix ensures that multiline query logs retain their original formatting, improving readability and troubleshooting.

How to use it

No explicit user action is required. The logging behavior is improved automatically when multiline queries with string literals, identifiers, or single-line comments are executed and logged by the server.