This isn't what you mean but I can't resist:
pg_dump -U postgres db | ssh [email protected] "dd of=db_dump"