Peter Geoghegan <pg@bowt.ie> writes:
> I think that repalloc might even be mandatory. These buffers are used
> as caches that allow us to avoid repeat strxfrm()/strcoll() calls,
> which is quite a useful optimization. But we're not accounting for
> that here -- we're not invalidating the cache. We wouldn't have to
> bother with that if we just used repalloc().
Hmm, but if we're enlarging the buffer, doesn't that imply
a new input value? Seems like invalidation must occur anyway.
regards, tom lane