2009/10/29 Giuliani Deon Sanches <[email protected]>:
> Ontem tentei dar um insert (via psql) em uma tabela que possui um
> campo do tipo timestamp without time zone e recebi o seguinte erro:
>
> "operator does not exist: timestamp without time zone => timestamp
> without time zone"
# SHOW datestyle ;
DateStyle
-----------
ISO, MDY
(1 row)
# CREATE TABLE minha_tabela(campo_data timestamp);
# INSERT INTO minha_tabela VALUES ('10-29-2009');
INSERT 0 1
# INSERT INTO minha_tabela VALUES (timestamp with time zone '10-29-2010');
INSERT 0 1
# SELECT CAST(campo_data AS varchar) campo_data from minha_tabela ;
campo_data
---------------------
2009-10-29 00:00:00
2010-10-29 00:00:00
# \d minha_tabela
Tabela "public.minha_tabela"
Coluna | Tipo | Modificadores
------------+-----------------------------+---------------
campo_data | timestamp without time zone |
-Leo
--
Leonardo Cezar
http://www.aslid.org.br
http://postgreslogia.wordpress.com
http://www.dextra.com.br/postgres
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral