Fix calculation of space needed for parsed words in tab completion.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: f5a4370aea3580f5f7f59a77e41fde62f2be12d8
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2015-12-21T20:08:56Z
Releases: 9.6.0
Fix calculation of space needed for parsed words in tab completion.

Yesterday in commit d854118c8, I had a serious brain fade leading me to
underestimate the number of words that the tab-completion logic could
divide a line into.  On input such as "(((((", each character will get
seen as a separate word, which means we do indeed sometimes need more
space for the words than for the original line.  Fix that.

Files

PathChange+/−
src/bin/psql/tab-complete.c modified +32 −28