Isso mesmo, Osvaldo.
Valeu!

At.te,
Alisson Viegas
Acsiv Sistemas

-----Mensagem original-----
De: pgbr-geral-boun...@listas.postgresql.org.br
[mailto:pgbr-geral-boun...@listas.postgresql.org.br] Em nome de Osvaldo
Kussama
Enviada em: segunda-feira, 30 de março de 2009 17:40
Para: Comunidade PostgreSQL Brasileira
Assunto: Re: [pgbr-geral] ::varchar retorna text

2009/3/30 Alisson Viegas <p...@acsiv.com.br>:
> Pessoal, por que a consulta abaixo está retornando um tipo text?
> select placa ||' - '|| modelo::varchar(50) as veiculo from fro.vei
>



De acordo com o manual a operação:
string || string
retorna um text.
http://www.postgresql.org/docs/current/interactive/functions-string.html

Se desejar algum outro tipo utilize cast explícito, se for possível.
http://www.postgresql.org/docs/current/interactive/sql-expressions.html#SQL-
SYNTAX-TYPE-CASTS

Osvaldo
_______________________________________________
pgbr-geral mailing list
pgbr-geral@listas.postgresql.org.br
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

_______________________________________________
pgbr-geral mailing list
pgbr-geral@listas.postgresql.org.br
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a