On Sat, 18 Apr 2020 15:08:59 +0200
Marc Espie <[email protected]> wrote:
> It's very likely to miss a canonical at least.
>
> Specifically, _Ports.FullPkgPath is not guaranteed to match every
> _Paths.Id
>
> the _Ports table get canonicalized to save space and avoid duplicates.
I saw the Canonical field in _Paths and wondered about its use, but I
am still unclear after your explanation. _Ports.FullPkgPath has a
foreign key constraint on _Paths.Id and _Paths.PkgPath has a constraint
on _Paths.Id, too. Constraint enforcement is disabled, but
SELECT pkgstem FROM _ports
LEFT JOIN _paths ON _paths.id = _ports.fullpkgpath
LEFT JOIN _paths AS _pkgpaths ON _pkgpaths.id = _paths.pkgpath
WHERE _pkgpaths.fullpkgpath IS NULL;
shows there are no violations.