An outer join preserves rows without matches and fills the missing side with NULL. A full outer join preserves unmatched rows from both relations. section 3.4.4
Keep every key from both inputs
SELECT * FROM (VALUES (1, 'a1'), (2, 'a2'), (3, 'a3')) l(id, nameA) FULL OUTER JOIN (VALUES (1, 'b1'), (2, 'b2'), (4, 'b4')) r(id, nameB) USING (id) ORDER BY id; The result retains matching IDs 1 and 2, left-only ID 3 with a missing right value, and right-only ID 4 with a missing left value.

