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:51 -0500 |
commit | db462a44e22dbaa945eabac7f73d2a240037f75e (patch) | |
tree | b8a86dab505fd40ef6b57e0e120fdce6ee5071c9 /src/bin/psql/input.c | |
parent | 03b138e90479895bf5467f38b40d817512822fcd (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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bin/psql/input.c b/src/bin/psql/input.c index 14ac034b576..30c580c12d3 100644 --- a/src/bin/psql/input.c +++ b/src/bin/psql/input.c @@ -346,8 +346,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(); |