diff options
author | Tom Lane | 2015-12-17 21:55:23 +0000 |
---|---|---|
committer | Tom Lane | 2015-12-17 21:55:23 +0000 |
commit | aee7705be5b75d8e7873a32c4a0dd0afe1ae5928 (patch) | |
tree | b18478848940c399570334ecad15675a5da2f3e2 | |
parent | 756e7b4c9db1fa713b886068643257c823baddaf (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.
-rw-r--r-- | src/bin/psql/input.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bin/psql/input.c b/src/bin/psql/input.c index c0c5524af5..2bc065adcf 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(); |