I have two relations such as relation1 and relation2. relation1 has columns of A,B,C and relation2 has columns of D,E,F.
I want to add A of relation1 with D of relation2 where C = F. For the C values which do not exist in relation2 must appear and F values which do not appear in relation1 also must appear How to do this postgresql?