Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> writes:
> The attached patch changes the existing behaviour of length(char(n)).
Applied, with some simplifications (there wasn't any particular need to
make a temporary copy of the string).
I also added some documentation stating that trailing spaces are
semantically insignificant in char(n), which I believe is now generally
true (have we missed any places?). There didn't seem to be any place to
specifically mention length() in this connection.
Interestingly, our regression tests did not detect this change of
behavior.
regards, tom lane