summaryrefslogtreecommitdiff
path: root/src/bin/psql/input.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-12-17 16:55:23 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2015-12-17 16:55:43 -0500
commit09b7abc27858b1973afc4201a69f1b34a557bba8 (patch)
tree3527c2c4aff1ecb95e8568f8b9e8428bd25f2708 /src/bin/psql/input.c
parent9afe392dc8f277db4b6c490519a88d7097393d38 (diff)
Fix improper initialization order for readline.
Turns out we must set rl_basic_word_break_characters *before* we call rl_initialize() the first time, because it will quietly copy that value elsewhere --- but only on the first call. (Love these undocumented dependencies.) I broke this yesterday in commit 2ec477dc8108339d; like that commit, back-patch to all active branches. Per report from Pavel Stehule.
Diffstat (limited to 'src/bin/psql/input.c')
-rw-r--r--src/bin/psql/input.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bin/psql/input.c b/src/bin/psql/input.c
index 1e5bba908a7..1b02f9324ad 100644
--- a/src/bin/psql/input.c
+++ b/src/bin/psql/input.c
@@ -341,8 +341,10 @@ initializeInput(int flags)
char home[MAXPGPATH];
useReadline = true;
- rl_initialize();
+
+ /* these two things must be done in this order: */
initialize_readline();
+ rl_initialize();
useHistory = true;
using_history();