diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2015-12-17 16:55:23 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2015-12-17 16:55:47 -0500 |
commit | b417779886f2d63f17f2049ce7ee7b290c470e15 (patch) | |
tree | 041b900dc26e259727379de68babd5a38cfdc0c6 | |
parent | bcce4a5e3ae0c93886989fb8ad615e5e6aa53a9f (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 29ad14bb548..a24eef522b2 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(); |