I tried to use PostgreSQL timestamp
datatype, but it throws an error
ERROR: date/time field value out of range: "1489849402536"
The schema
create table times (
time timestamp not null,
);
JS code
`insert into times(time) values (${Date.now()})`
P.S. another option is to use bigint
but it seems like an overkill.