Загрузка данных


SELECT
    c.id,
    c.number,
    f.department_type
FROM ourpension.contract c
LEFT JOIN LATERAL ourpension.get_contract_fields_main(c.id) f
    ON true
WHERE c.number = '0025789';