次の構造を含む PostgreSQL テーブルがあります。
Parent child1 child2
1 10 12
2 13
3
私がしたい:
Parent child1 child2
1 10 12
2 13 13
3 3 3
つまり、child2 が NULL の場合、child1 を child2 に複製したいということです。child1 が null の場合、親を child1 と child2 に複製します。