Hello list, is there a way to write in plpgsql the query that returns a set of this: create view xxx as (select '3ARR' as level, dpe_stamp from detpa where dpe_productfk=1 order by 2 desc limit 1) union all (select '2CAM' as level, dpe_stamp from detpc where dpe_productfk=1 order by 2 desc limit 1) union all (select '1PRO' as level, dpe_stamp from detpp where dpe_productfk=1 order by 2 desc limit 1) order by 1 desc limit 1 ; I already tried to use the same code in for in code block, I have a custom type and a empty table for the return setof, any idea or suggestion? Thanks in advance -- Sinceramente, Josué Maldonado. "El sabio habla porque tiene algo que decir; el tonto, porque tiene que decir algo" -- Platon
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера