Обсуждение: problems using pg_dump and datestyle format
Hi all, I have changed the host I run PostgreSQL using pg_dump to move the data. Is there any issue related to datastyle or locales and pg_dump ?? I think that all dates on my columns got modified some how ! I used to make a query like set datestyle 'sql,european'; select * from mytbl where date < 'dd/mm/yyyy'; but that's not working anymore because I'm getting a PostgreSQL Error: 1 (ERROR: Bad date external representation '08/18/2001' ) please help ! -- Leandro Rodrigo Saad Cruz IT - Inter Business Tecnologia e Servicos (IB)
Вложения
Bad date external representation Was :[problems using pg_dump and datestyle format]
От
Leandro Rodrigo Saad Cruz
Дата:
Hi, I searched the mailing list and I am stuck. INFO : > monitorar=# SHOW DateStyle ; > NOTICE: DateStyle is SQL with European conventions > SHOW VARIABLE > > monitorar=# SELECT oid from reservas where data_comp = '20/08/2001'; > oid > -------- > 254376 > (1 row) > > monitorar=# \d reservas > Table "reservas" > Attribute | Type | Modifier > -------------------+-----------------------+---------- > flag | smallint | > num_org | character varying(6) | > nome_org | character varying(30) | > tipo_reserva | character varying(3) | > num_reserva | bigint | not null > sequencia | character varying(4) | not null > cod_material | character varying(20) | > desc_material | character varying(30) | > unidade | character varying(2) | > quant_total | integer | > quant_atendida_ac | integer | > quant_dia | integer | > quant_pendente | integer | > data_integracao | date | > data_necessidade | date | > data_separacao | date | > data_nf | date | > data_envio | date | > data_entrega | date | > num_nf | character varying(10) | > num_conhecimento | character varying(10) | > nome_trans | character varying(30) | > data_comp | date | > Indices: data_comp_reservas_key, > reservas_pkey PROBLEM : > monitorar=# SELECT oid from reservas where data_comp < '20/08/2001'; > ERROR: Bad date external representation '08/20/2001' -- Leandro Rodrigo Saad Cruz IT - Inter Business Tecnologia e Servicos (IB)