I am using this command to upsert data in PostgreSQL:
insert into sub_relation(user_id,sub_source_id,sub_status,created_time,updated_time) values (