E
Size: a a a
MC
E
MC
ДМ
E
IS
ДМ
update set
contact_name = excluded.contact_name,
company = excluded.company,
contact_group = excluded.contact_group,
email = excluded.email,
account_name = excluded.account_name,
job_title = excluded.job_title,
updated_times = case when
(contact_name <> excluded.contact_name and excluded.contact_name is not null) or
(company <> excluded.company and excluded.company is not null) or
(contact_group <> excluded.contact_group and excluded.contact_group is not null) or
(email <> excluded.email and excluded.email is not null) or
(account_name <> excluded.account_name and excluded.account_name is not null) or
(job_title <> excluded.job_title and excluded.job_title is not null) then
updated_times = updated_times+1
end;
ДМ
ДМ
IS
E
IS
IS
MC
update set
contact_name = excluded.contact_name,
company = excluded.company,
contact_group = excluded.contact_group,
email = excluded.email,
account_name = excluded.account_name,
job_title = excluded.job_title,
updated_times = case when
(contact_name <> excluded.contact_name and excluded.contact_name is not null) or
(company <> excluded.company and excluded.company is not null) or
(contact_group <> excluded.contact_group and excluded.contact_group is not null) or
(email <> excluded.email and excluded.email is not null) or
(account_name <> excluded.account_name and excluded.account_name is not null) or
(job_title <> excluded.job_title and excluded.job_title is not null) then
updated_times = updated_times+1
end;
updated_times = case whenКогда вы говорите "обнови contact_name из excluded.contact_name", он понимает куда
(contact_name <> excluded.contact_name and excluded.contact_name is not null)
MC
contact_name