pgsql: Further improvement of make_greater_string.

Started by Tom Laneover 14 years ago1 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

Further improvement of make_greater_string.

Make sure that it considers all the possibilities that the old code did,
instead of trying only one possibility per character position. To keep the
runtime in bounds, instead tweak the character incrementers to not try
every possible multibyte character code. Remove unnecessary logic to
restore the old character value on failure. Additional comment and
formatting cleanup.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/eb5834d5af5fd094da2f61a874d9d0ec9c870f6c

Modified Files
--------------
src/backend/utils/adt/selfuncs.c | 37 ++++-
src/backend/utils/mb/wchar.c | 334 ++++++++++++++++++--------------------
2 files changed, 183 insertions(+), 188 deletions(-)