FULL JOINは、結合元(左のテーブルと呼ぶ)・結合先(右のテーブルと呼ぶ)の両方のテーブルのすべての行を残し、一致しない側には NULL を補う結合。
https://www.postgresql.jp/docs/9.4/queries-table-expressions.html
postgresdb1=# SELECT * FROM users;
id | name
----+-------
1 | Alice
2 | Bob
(2 行)
postgresdb1=# SELECT * FROM test_results;
id | user_id | score
----+---------+-------
1 | 1 | 80
2 | 3 | 90
(2 行)
postgresdb1=# SELECT
users.name,
test_results.score
FROM
users
JOIN
test_results ON users.id = test_results.user_id;
name | score
-------+-------
Alice | 80
(1 行)
postgresdb1=# SELECT
users.name,
test_results.score
FROM
users
FULL JOIN
test_results ON users.id = test_results.user_id;
name | score
-------+-------
Alice | 80
| 90
Bob |
(3 行)
postgresdb1=#どっちかが空でも表示される。