Answer the question
In order to leave comments, you need to log in
How to fix data type error?
I make a request
INSERT INTO data.source(id, created, created_utc) VALUES($1, to_timestamp('$2'), to_timestamp('$3'))
error: invalid input syntax for type double precision: "$2"
1581569438
to_timestamp(double precision)
Answer the question
In order to leave comments, you need to log in
For some reason, the value of the variable "$2" is not substituted in your code and the string '$2' is transferred to the database, not a number.
Have a look at SQL fiddle
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question