INSERT INTO messages (sender_first_name, sender_id, sender_username, message_id, message_text, chat_title, chat_id, chat_username, parser_first_name, parser_id, parser_username, parser_phone_number, got_time) SELECT sender_first_name, sender_id, sender_username, message_id, message_text, chat_title, chat_id, chat_username, parser_first_name, parser_id, parser_username, parser_phone_number, got_time FROM allmessages WHERE message_text LIKE '%ищу менеджер%' OR message_text LIKE '%ищу помощник%' OR message_text LIKE '%ищу специалист%' OR message_text LIKE '%нужен менеджер%' OR message_text LIKE '%нужен помощник%' OR message_text LIKE '%нужен специалист%' OR message_text LIKE '%Ищу менеджер%' OR message_text LIKE '%Ищу помощник%' OR message_text LIKE '%Ищу специалист%' OR message_text LIKE '%Нужен менеджер%' OR message_text LIKE '%Нужен помощник%' OR message_text LIKE '%Нужен специалист%'
on conflict do update
set sender_first_name=allmessages.sender_first_name, ...
ну или
on conflict do nothing