PostgreSQL has the ability to create record types. A lot of operations like regexp_match return text[]. What is the most efficent way to go from text[] to a custom record type? Currently, I’m doing it quite explicitly, SELECT (a[1],a[2],a[3],a[4],a[5],a[6])::census.series_id FROM census.alldata CROSS JOIN LATERAL regexp_matches(series_id, ‘^(.{2})(.)(.*?)(.{4})(.{2})(.)$ ‘) AS t(a); And, I’m wondering if there isRead more