Make bit/varbit substring() treat any negative length as meaning "all the rest
of the string". The previous coding treated only -1 that way, and would
produce an invalid result value for other negative values.
We ought to fix it so that 2-parameter bit substring() is a different C
function and the 3-parameter form throws error for negative length, but
that takes a pg_proc change which is impractical in the back branches;
and in any case somebody might be relying on -1 working this way.
So just do this as a back-patchable fix.
varbit.c (r188.8.131.52 -> r184.108.40.206)
pgsql-committers by date
|Next:||From: Tom Lane||Date: 2010-01-07 20:17:44|
|Subject: pgsql: Fix 3-parameter form of bit substring() to throw error for |
|Previous:||From: Tom Lane||Date: 2010-01-07 19:53:39|
|Subject: pgsql: Make bit/varbit substring() treat any negative length as meaning |