Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

388
Visualizações
PostgreSQL: Table has type character varying, but query expects timestamp without time zone

In a PostgreSQL database, when I tried to make use of COPY function to insert a timestamp value into a table that partitoined with that timestamp field, I got blelow error message:

ERROR:  attribute 11 has wrong type
DETAIL:  Table has type character varying, but query expects timestamp without time zone.

I COPY the same timestamp vaue to anther table that has no partitioning and result is good. Therefor I guess this might be a problem for pg_pathman

DATA=# copy table_without_partition(created_time) from '/tmp/test.csv' with csv;
COPY 1

Below is may testing env and data:

Database: postgres 9.6.2

Partition with pg_pathman:

select create_range_partitions('table'::regclass,'created_time','2017-02-08 00:00:00'::timestamp,interval '1 hour',96,false );

The csv content I test for COPY function: 2017-02-08 00:00:00

The command I test:

 copy table(created_time) from '/tmp/test.csv' with csv;

Would someone give me some advise and help me out?

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda