2 ms·
you can do the same in PostgreSQL with joins. For example: select i.* , array_agg(ROW(l.*)::text) from invoice i join invoice_line l ON i.id = l.invoice_id
by einhverfr 15y ago
you can do the same in PostgreSQL with joins.
For example:
select i.* , array_agg(ROW(l.*)::text)
from invoice i
join invoice_line l ON i.id = l.invoice_id
where i.id = 1023;
This returns a single row for invoice, along with an array of tuples representation of all invoice lines. You could also use casts and stored procedure languages to convert to xml or whatever if you want.