Gevik Babakhani wrote: > gevik=# set lc_messages to 'Spanish_Spain'; > SET > gevik=# select to_char((current_date + s.a),'TMDay TMMonth YYYY') as dates > from generate_series(0,6) as s(a); > dates > ----------------------- > Jueves Febrero 2008 > Viernes Febrero 2008 > Sbado Febrero 2008 > Domingo Febrero 2008 > Lunes Febrero 2008 > Martes Febrero 2008 > Mircoles Febrero 2008 > (7 rows)
Hmm, interestingly you lost the diacritics here. The output is mangled for Saturday and Wednesday, which should read "Sábado" and "Miércoles" respectively. It is not good that the system allows you to output invalidly encoded data. What happens if you try setting lc_messages to Spanish_Spain.65001 instead? Ideally, it should be an error to set lc_messages to a value that's not compatible with the current encoding. Do we do that currently elsewhere? (Perhaps this is not a problem with your patch, but rather a problem that's worth fixing separately.) -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings