Karel Zak <zakkr@zf.jcu.cz> writes:
> change_to_on_the_fly_locale_setting()
> to_char();
> set_original_locale();
And if to_char throws an elog?
Another objection is that (if my experience with libc's
timezone-dependent code is any guide) changing the locale that much
is likely to be *slow*. libc is designed on the assumption that you
set these things once at application startup, so it precomputes a ton
of stuff whenever you change 'em.
regards, tom lane