On 2021-01-18 18:23, Tom Lane wrote:
The reason I got interested in this right now is the nearby discussion [1] about why findoidjoins misses some catalog relationships and whether we should fix that and/or make its results more readily accessible. I'd thought perhaps FK constraint entries could supersede the need for that tool altogether, but now it seems like not.
Yes, catalog consistency checking was also something I had in mind. There are clearly a number of complications still to resolve. But in general the idea of representing relationships between tables in the DDL/schema sounds like a sensible idea.
-- Peter Eisentraut 2ndQuadrant, an EDB company https://www.2ndquadrant.com/