aboutsummaryrefslogtreecommitdiff
path: root/src/fe_utils/psqlscan.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe_utils/psqlscan.l')
-rw-r--r--src/fe_utils/psqlscan.l9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/fe_utils/psqlscan.l b/src/fe_utils/psqlscan.l
index b0fd4394ec6..db8a8dfaf25 100644
--- a/src/fe_utils/psqlscan.l
+++ b/src/fe_utils/psqlscan.l
@@ -378,12 +378,11 @@ other .
/*
* Note that the whitespace rule includes both true
* whitespace and single-line ("--" style) comments.
- * We suppress whitespace at the start of the query
- * buffer. We also suppress all single-line comments,
- * which is pretty dubious but is the historical
- * behavior.
+ * We suppress whitespace until we have collected some
+ * non-whitespace data. (This interacts with some
+ * decisions in MainLoop(); see there for details.)
*/
- if (!(output_buf->len == 0 || yytext[0] == '-'))
+ if (output_buf->len > 0)
ECHO;
}