On Wed, 7 Feb 2001, Hannu Krosing wrote: > > Hi, > > I've written a small function that should go into contrib for 7.1 > > As locale issues are quite tricky, being able to find out what locale > backend thinks it is in is a good thing ;) hmm, see you PG sources -- pg_locale.c file? I mean that is not good lavish the sources with same code. If this is really needful will better add your idea into this file and use PGLC_current() instead add to sources again new setlocale() call. The current backend (unfortunately) disable change locales on the fly -- this means your function will returns always same result :-) IMHO more nice will some function 'environment()' returns *all* backend environment values (locales, debug mode ... etc) or command "SHOW LOCALE" or something like this. Karel