Pessoal,

Preciso de uma função que retorne o DIA da semana em portugues. Encontrei a
solução da seguinte forma :

select to_char(date'2015-05-05','TMDay') as dia;
   dia
---------
 Tuesday
(1 row)

Sem o 'TM' (translation mode) retorna a mesma coisa, em ingles :

select to_char(date'2015-05-05','Day') as dia;
    dia
-----------
 Tuesday
(1 row)

Não retorna em Portugues, segue abaixo alguns dados do meu ambiente
postgresql

Linux Ubuntu 12.04
versão postgresql : 8.2.17
# locale
salt@ubuntu:/mnt/hd2/opt/dados/temp$ locale
LANG=pt_BR.UTF-8
LANGUAGE=pt_BR:pt:en
LC_CTYPE="pt_BR.UTF-8"
LC_NUMERIC=pt_BR
LC_TIME=pt_BR
LC_COLLATE="pt_BR.UTF-8"
LC_MONETARY=pt_BR
LC_MESSAGES="pt_BR.UTF-8"
LC_PAPER=pt_BR
LC_NAME=pt_BR
LC_ADDRESS=pt_BR
LC_TELEPHONE=pt_BR
LC_MEASUREMENT=pt_BR
LC_IDENTIFICATION=pt_BR
LC_ALL=

set lc_time='pt_BR.UTF8';
SET
set lc_messages='pt_BR.UTF8';
SET

Alguma dica ?

-- 
Atenciosamente,

Luiz Henrique

"Virtus in medium est"
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a