Re: Foreign Keys being able to reference same table not spelled out in documentation

2021-05-06 Thread Tom Lane
"David G. Johnston" writes: > I did a read through of the patch and I like it; though I suggest changing > "but non-NULL" to "while non-NULL". Done that way, thanks. regards, tom lane

Re: Foreign Keys being able to reference same table not spelled out in documentation

2021-05-06 Thread maweki
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 t

Re: Foreign Keys being able to reference same table not spelled out in documentation

2021-05-05 Thread David G. Johnston
On Thu, Apr 29, 2021 at 10:33 AM Tom Lane 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

Re: Foreign Keys being able to reference same table not spelled out in documentation

2021-04-29 Thread Tom Lane
PG Doc comments form writes: > In Section 5.4.5 of the documentation regarding Foreign Key Constraints it > is stated > "A foreign key constraint specifies that the values [...] must match the > values appearing in some row of another table." > But referencing the same table is allowed and necessa

Foreign Keys being able to reference same table not spelled out in documentation

2021-04-29 Thread PG Doc comments form
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/13/ddl-constraints.html Description: Hello, In Section 5.4.5 of the documentation regarding Foreign Key Constraints it is stated "A foreign key constraint specifies that the values [...] must