Z
idle in transaction? Мне это надо донести до отдела разработки чтобы они хотя бы задумались над тем чтобы попробовать их починить (есть транзакции которые в
idle in transaction состоянии живут дольше часа).Size: a a a
Z
idle in transaction? idle in transaction состоянии живут дольше часа).VY
idle in transaction? idle in transaction состоянии живут дольше часа).idle in trnsaction, ни один новый запрос не пролезетВТ
idle in trnsaction, ни один новый запрос не пролезетДМ
Error occurred during SQL query executionВерсия постгрес 12, эта функция поддерживается
Причина:
SQL Error [42883]: ERROR: function json_to_recordset(jsonb) does not exist
Подсказка: No function matches the given name and argument types. You might need to add explicit type casts.
Где: PL/pgSQL function insert_or_update(jsonb) line 3 at SQL statement
Z
Error occurred during SQL query executionВерсия постгрес 12, эта функция поддерживается
Причина:
SQL Error [42883]: ERROR: function json_to_recordset(jsonb) does not exist
Подсказка: No function matches the given name and argument types. You might need to add explicit type casts.
Где: PL/pgSQL function insert_or_update(jsonb) line 3 at SQL statement
ДМ

ВТ
R
Z

ДМ
Z
ДМ
Z
ДМ
ДМ
CREATE OR REPLACE FUNCTION public.insert_or_update(data jsonb)
returns void
LANGUAGE plpgsql
AS $function$
begin
insert into public.contacts
(
user_id,
phone_number,
country_code,
email,
contact_name,
company,job_title,
account_name,
contact_group,
created_at
)
select x.userId, x.phoneNumber, x.countryCode, x.contactName, x.company, x.jobTitle, x.accountName, x.contactGroup, x.createdAt
from jsonb_to_recordset(data)
on conflict on constraint contacts_un do
update set
contact_name = new.contact_name,
company = new.company,
contact_group = new.contact_group,
email = new.email,
account_name = new.account_name,
job_title = new.job_title
END;
$function$
Z
Z
ИР
MZ
АШ