Sample Header Ad - 728x90

In which system table does Postgres store FK cardinality?

0 votes
1 answer
476 views
I'm trying to reverse engineer a set of PG databases into a Data Model. I've found everything I need to define all the sub-models, tables, columns and FK constraints, but can't find anywhere that details whether the relation is 0:1, 1:many, 1:0..1 etc I've looked in
pg_constraint
information_schema.check_constraint_routine_usage
information_schema.check_constraints
information_schema.constraint_column_usage
information_schema.constraint_table_usage
information_schema.domain_constraints
information_schema.referential_constraints
information_schema.table_constraints
information_schame.key_column_usage
but there's nothing (obvious) which details the cardinality. Does anyone know where this can be found?
Asked by khafka (79 rep)
Nov 26, 2019, 02:28 PM
Last activity: Sep 30, 2022, 06:01 AM