Peter,
Take a look at
minus/except. You can use this operator in a way similar to union. It will give you all the rows in table b that are not in table a.
Then you can union that result with table a to get what you are looking for and do a query off of the union'd table.
The only catch is that the tables must have the same column names. You can use a view to do this to simplify things. You could also do it by defining the anonymous tables in your query, but this query is going to be quite involved as is. The views will make things more readable.