Alvaro Herrera <alvhe...@alvh.no-ip.org> writes: > Hmm, is it valid to make pg_regex_locale point to a function-local > static here? The lifetime of this static is not clear to me, and I > think this pattern works with at least some compilers, but I remember > comments on previous patch review threads that this pattern isn't > kosher.
We use function-local statics in other places, and I have never heard that it's not kosher. There would be little point in declaring such a variable static at all if that didn't cause it to have persistent storage. regards, tom lane