NAME
DBIO::PostgreSQL::Introspect::OutsideDependents - Introspect what stands on a table, a type or a schema of the model and is not in it
VERSION
version 0.900007
DESCRIPTION
The model is bounded by the schema filter (pg_schemas). A drop the diff writes (DROP TABLE, DROP TYPE, DROP SCHEMA, all without CASCADE) meets whatever depends on the object, and the diff has taken out of the way only what the model holds. This section names the rest, so that DBIO::PostgreSQL::Diff::Dependents can refuse the drop by name instead of leaving it to the server.
Without a schema filter every schema is in the model, so there is no table and no type with a dependent outside it: only the schemas part is read there.
METHODS
fetch
my $dependents = DBIO::PostgreSQL::Introspect::OutsideDependents->fetch($dbh, $filter);
Returns a hashref with three keys, each a hashref from the key of an object of the model to an ArrayRef of its dependents:
tables, keyed byschema.table-- for a table, a partitioned table or a foreign table in the filter: the views and materialized views in a schema outside it that read the table (view,materialized view), the foreign keys of tables outside it that point at it (foreign key, named with the table that holds it inon), and the partitions and inheriting tables outside it (partition,inheriting table)types, keyed byschema.type-- for an enum, a composite type or a range type in the filter: the columns of relations outside the filter that are of the type or an array of it (column,schema.relation.column), the functions, procedures and aggregates outside it that take or return it (function,procedure,aggregate,window function) and the domains over it (domain)schemas, keyed by the name of the schema -- for every schema in the filter, or in the database where there is none: what stands in it and is of a kind the model does not hold (domain,operator,collation,operator class,operator family,conversion,statistics objectand thetext search ...kinds), as the server describes it
An entry is a hashref with name, kind and, for a foreign key, on. An object of schemas that is no domain has the description the server gives for it (pg_describe_object, kind included) as its name and no kind. An entry carries names only. System schemas and what an extension owns are left out; only the direct dependents are listed, not the objects that stand on them.
AUTHOR
DBIO & DBIx::Class Authors
COPYRIGHT AND LICENSE
Copyright (C) 2026 DBIO Authors Portions Copyright (C) 2005-2025 DBIx::Class Authors Based on DBIx::Class, heavily modified.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.