How can I address a specific field in record, or can I even define record like in Oracle for example
DECLARE
TYPE timerec IS RECORD (hours SMALLINT, minutes SMALLINT);
BEGIN
-- something
END;
Here is example of what I mean
do $$
declare
radek record; -- is it posible to define elements in record, I found nothing in postgres documentation
begin
select 'c1', timestamp 'now' , 8 into radek ;
raise notice '% ' , radek;
-- I want to display/select only the middle value (time)
-- so I need something like raise notice '% ' , radek(2)
radek := (1::int , 'text'::text, date 'tomorrow' );
raise notice '% ' , radek;
-- same case here
end $$
I am using different data types so array is not a solution