pgsql_orcl_record_1.htm
Oracle and PostgreSQL , both provide an extensive scope of creating composite data type .
PostgreSQL:

Record:
CREATE FUNCTION test_rec1(a TEXT, b TEXT) RETURNS RECORD AS $$
DECLARE
pgs_rec1 RECORD;
BEGIN
-- Arbitrary expression to change the first parameter
IF LENGTH(a) < LENGTH(b) THEN
SELECT TRUE, a || b, 'a shorter than b' INTO pgs_rec1;
ELSE
SELECT FALSE, b || a INTO pgs_rec1;
END IF;
RETURN pgs_rec1;
END;$$ LANGUAGE plpgsql;

Oracle :