I would like to do the following:
psql -c "COPY (SELECT a.id, b.id FROM a JOIN b USING id) TO STDOUT;"
the problem is that it would never send anything until the join is fully computed. Is there a way to tell Postgres to output the join while its being computed without writing it into a some temporary storage?