0
votes

I have a issue when I migrate table from one database to another database table. I am using PostgreSQL database.

The issue:

SQL error:

ERROR:  invalid input syntax for type timestamp: "31:57.7"
LINE 2:      VALUES ('52','GUIDO Layouts','','f','47','31:57.7','34:...

In statement:

INSERT INTO "public"."projects" ("id","name","description","public","parent_id","created_at","updated_at","identifier","lft","rgt","templated","active")
                    VALUES ('52','GUIDO Layouts','','f','47','31:57.7','34:31.5','guido-layouts','81','82','f','t') 

I checked both table structure are same. both column(create_at) using timestamp without time zone and I tried using now()

please help me

1
31:57.7 is not a valid timestamp. - Laurenz Albe

1 Answers

0
votes

timestamp is a datetime so you need a date component to make it work with a timestamp field. You can use it as a time, so:

'31:57.7'::time 00:31:57.7.

You have two choices:

  1. If you want to stick with using just time, change the column type to time.
  2. Keep the timestamp type and change the value to a timestamp(datetime).