Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

386
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!