pgsql: Fix integer-overflow corner cases in substring() functions.

2021-01-04 Thread Tom Lane
Fix integer-overflow corner cases in substring() functions. If the substring start index and length overflow when added together, substring() misbehaved, either throwing a bogus "negative substring length" error on a case that should succeed, or failing to complain that a negative length is negati

pgsql: Fix integer-overflow corner cases in substring() functions.

2021-01-04 Thread Tom Lane
Fix integer-overflow corner cases in substring() functions. If the substring start index and length overflow when added together, substring() misbehaved, either throwing a bogus "negative substring length" error on a case that should succeed, or failing to complain that a negative length is negati

pgsql: Fix integer-overflow corner cases in substring() functions.

2021-01-04 Thread Tom Lane
Fix integer-overflow corner cases in substring() functions. If the substring start index and length overflow when added together, substring() misbehaved, either throwing a bogus "negative substring length" error on a case that should succeed, or failing to complain that a negative length is negati

pgsql: Fix integer-overflow corner cases in substring() functions.

2021-01-04 Thread Tom Lane
Fix integer-overflow corner cases in substring() functions. If the substring start index and length overflow when added together, substring() misbehaved, either throwing a bogus "negative substring length" error on a case that should succeed, or failing to complain that a negative length is negati