Not sure if you are asking this *tongue-in-cheek* or not. But the answer to this is very simple, from my experience: Drum roll... To insert child rows, using the `RETURNING`'s surrogate key of the parent row, which may pre-exist, as a foreign key. PS: Didn't read the whole thread, so maybe I'm off-topic :)