Hello,
please consider integrating making the usual readilne binding M-# do in psql what users expect from it: insert comment
at the beginning of the line. See for patch:
https://www.postgresql.org/message-id/01e0355e-381e-9732-7d4e-cbd0e6bfa710@aegee.org
At
https://www.postgresql.org/message-id/0afcbc3f-8c1c-c576-824a-5cc02e5a81e5@2ndquadrant.com was suggested to postpone
this for PG11. Now you can integrate this on the master branch.
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,8 @@ initializeInput(int flags)
/* these two things must be done in this order: */
initialize_readline();
rl_initialize();
+ if (!strcmp("#", rl_variable_value("comment-begin")))
+ rl_variable_bind("comment-begin", "--");
useHistory = true;
using_history();
Regards
Дилян