Re: Foreign Keys being able to reference same table not spelled out in documentation
От | maweki@gmail.com |
---|---|
Тема | Re: Foreign Keys being able to reference same table not spelled out in documentation |
Дата | |
Msg-id | a9f4021f4a762a4d0cfaed2477f53c6e772c876a.camel@gmail.com обсуждение исходный текст |
Ответ на | Re: Foreign Keys being able to reference same table not spelled out in documentation ("David G. Johnston" <david.g.johnston@gmail.com>) |
Список | pgsql-docs |
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 <tgl@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. >
В списке pgsql-docs по дате отправления: