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:33 -0500 |
commit | 5ec0aad018c3f36f9bd3e844f20562fb3c5d4590 (patch) | |
tree | b1d780b81a9ced1eaf31e3d2120dee3b4213ed3a /src | |
parent | 0c6881fd142383845974ac836f3e6476cbe974ee (diff) | |
download | postgresql-5ec0aad018c3f36f9bd3e844f20562fb3c5d4590.tar.gz postgresql-5ec0aad018c3f36f9bd3e844f20562fb3c5d4590.zip |
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')
-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 c0c5524af53..2bc065adcff 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(); |