aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/psql/input.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/psql/input.c b/src/bin/psql/input.c
index f926bc98dc2..1dcd95a7b9e 100644
--- a/src/bin/psql/input.c
+++ b/src/bin/psql/input.c
@@ -353,8 +353,13 @@ initializeInput(int flags)
useReadline = true;
- /* these two things must be done in this order: */
+ /* set appropriate values for Readline's global variables */
initialize_readline();
+
+ /* set comment-begin to a useful value for SQL */
+ (void) rl_variable_bind("comment-begin", "-- ");
+
+ /* this reads ~/.inputrc, so do it after rl_variable_bind */
rl_initialize();
useHistory = true;