Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

387
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda