Witajcie.
Mam do zbudowania małą funkcję w postgresie, a nigdy jeszcze tego nie robiłem.
Mam taki kod:
if coalesce(aniegenerujkomunikatu, 'F') != 'T' then
if aniegenerujkomunikatu == 'T' then
if rav is null then .
else
if rav.fk_statuspm <> astatpm then
--send message
perform send_message(...........);
end if;
end if;
end if;
return 0;
end;
Założenie jest takie, że jak wartość aniegenerujkomunikatu będzie równa F - to wtedy wykon a się send_message.
Czy taki kod jest ok?