postgres.git / summary / log / commit / refs

commit    acb6c64f4a3628ea7005b3c492633a71e52c95ff
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Thu Dec 17 21:55:23 2015 +0000
First released in: 9.6.0, 9.1.20, 9.2.15, 9.3.11, 9.4.6, 9.5.0

    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.


src/bin/psql/input.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bin/psql/input.c b/src/bin/psql/input.c index 113de61a87f..aa5343205f5 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(); [parent: e168dfef609c]