diff --git a/src/bin/psql/input.c b/src/bin/psql/input.c
--- a/src/bin/psql/input.c
+++ b/src/bin/psql/input.c
@@ -356,6 +356,7 @@ initializeInput(int flags)
                 /* these two things must be done in this order: */
                 initialize_readline();
                 rl_initialize();
+               rl_variable_bind("comment-begin", "--");

                 useHistory = true;
                 using_history();
