Using the following query, I'm able to export two tables, selecting 500 items randomly from the first:
copy (select * from (
select 1 + floor(random() * 1040000)::integer as "documentUUID"
from generate_series(1, 600) g
group by 1) r
join "Document" using ("documentUUID")
inner join "Citation" on ("Document"."citation_id" = "Citation"."citationUUID")
limit 500)
to '/tmp/data.sql';
I want to import this data into my testing database, but COPY FROM doesn't seem to be able to handle multiple table imports.
How can I make this work?