You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECTn.nspname, -- схемаt.relname-- отношениеFROMpg_catalog.pg_classAS t
INNER JOINpg_catalog.pg_namespaceAS n
ONt.relnamespace=n.oidWHERE
relkind IN ('r', 'p')
ANDt.oid NOT IN (SELECT conrelid FROMpg_catalog.pg_constraintWHERE contype IN ('f'))
ANDt.oid NOT IN (SELECT confrelid FROMpg_catalog.pg_constraintWHERE contype IN ('f'))
ANDn.nspname NOT IN ('information_schema', 'pg_catalog')
ANDn.nspname NOT LIKE'pg_toast%'
The text was updated successfully, but these errors were encountered:
See https://habr.com/ru/articles/803841/
Part "Отношения не участвующие в FK"
This check can find potentially outdated or unused tables
The text was updated successfully, but these errors were encountered: