Fix text_position to not scan past end of source string in multibyte

Joe Conway <mail@joeconway.com>

Commit: b59917f02e3ccb025d393b1e38acc935033f07fd
Author: Joe Conway <mail@joeconway.com>
Date: 2004-02-01T04:05:13Z
Releases: 7.3.6
Fix text_position to not scan past end of source string in multibyte
case, per report from Korea PostgreSQL Users' Group. Copied from Tom
Lane's 7.4 branch patch.

Files

PathChange+/−
src/backend/utils/adt/varlena.c modified +7 −4