Adjust extra lines generated by psql to be valid SQL comments.
Nathan Bossart <nathan@postgresql.org>
Adjust extra lines generated by psql to be valid SQL comments. psql's --echo-hidden, --log-file, and --single-step options generate extra lines to clearly separate queries from other output. Presently, these extra lines are not valid SQL comments, which makes them a hazard for anyone trying to copy/paste the decorated queries into a client or query editor. This commit replaces the starting and ending asterisks in these extra lines with forward slashes so that they are valid SQL comments that can be copy/pasted without incident. Author: Kirk Wolak Reviewed-by: Pavel Stehule, Laurenz Albe, Tom Lane, Alvaro Herrera, Andrey Borodin Discussion: https://postgr.es/m/CACLU5mTFJRJYtbvmZ26txGgmXWQo0hkGhH2o3hEquUPmSbGtBw%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/psql/command.c | modified | +4 −4 |
| src/bin/psql/common.c | modified | +8 −8 |
Discussion
- psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN) 20 messages · 2023-05-15 → 2023-10-24