Note that it is in general not necessary for the referencing column to be NULLABLE. If you defer the constraint checking, you can insert a cyclic structure. Of course, it's no longer a tree then.
The tutorial-ness of the documentation was already pointed out and I don't think it needs to be said there. We just would want to not imply this (nullable) would be necessary. Documentation-wise I liked to MariaDB approach very much, where the two tables were named "parent table" and "child table" and at some point you note that it is allowed for a table to be both. But this would be a lot more invasive. All the Best Mario Wenzel Am Mittwoch, dem 05.05.2021 um 21:17 -0700 schrieb David G. Johnston: > On Thu, Apr 29, 2021 at 10:33 AM Tom Lane <t...@sss.pgh.pa.us> wrote: > > I'm inclined to propose adding an example a little further down, as > > per the attached draft patch. This wouldn't help people who stop > > reading after the section's first sentence, but we can't cover > > everything in the first sentence. > > > > > > > Given the tutorial nature of this section I agree with the approach. > > I did a read through of the patch and I like it; though I suggest > changing "but non-NULL" to "while non-NULL". > > Thanks! > > David J. >