By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE
INSERT 0 4
| start_id | children |
|---|---|
| 1 | {2,3,4} |
| 2 | {3,4} |
| 3 | {4} |
| 4 | null |
SELECT 4
CREATE TABLE
INSERT 0 4
| start_id | children |
|---|---|
| 1 | {2,3,4} |
| 2 | {3,4} |
| 3 | {4} |
| 4 | null |
SELECT 4