Answer the question
In order to leave comments, you need to log in
How to insert a function into a templated query string?
How to insert a function into a templated query string?
The created field is of type timezone. I want to convert the source data to this type using the postgre's TO_TIMESTAMP() function .
How to do it?
INSERT INTO data.source(created, created_utc) VALUES($1, $2)
error: invalid input syntax for type timestamp with time zone: "TO_TIMESTAMP('1581569438')"
INSERT INTO data.source(created, created_utc) VALUES(TO_TIMESTAMP('$1'), TO_TIMESTAMP('$2'))
duplicate key value violates unique constraint "source_pkey"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question