NAME

DBIO::PostgreSQL::PostGIS::Topology::Extension - The postgis_topology extension: its topologies are runtime schemas, not the application's

VERSION

version 0.900004

SYNOPSIS

package MyApp::DB;
use DBIO Schema => -pg;
__PACKAGE__->pg_extensions('postgis', 'postgis_topology');

DESCRIPTION

One engine extension, one entry, one class (ADR 0066, Decisions, 7): postgis_topology is its own extension in pg_extension, apart from postgis, and is declared apart from it.

Topologies are runtime schemas. CREATE EXTENSION postgis_topology makes the schema topology with the tables topology.topology and topology.layer; those are members of the extension. topology.CreateTopology('name', srid) adds a row to topology.topology and creates a schema of that name, holding edge_data, face, node, relation, the view edge and their sequences and indexes. None of these has a pg_depend membership in the extension (measured on PostGIS 3.6), so the driver's base filter does not keep them out of the model: without claims a deploy would take them for the application's tables and drop them. This class claims the schemas, the same way Apache AGE claims its graph schemas.

The class does nothing else. A topology layer (topology.layer, the topogeometry columns of the application's own tables) stays the application's.

METHODS

extension_interface

Returns 1.

name

Returns postgis_topology.

driver

Returns DBIO::PostgreSQL.

inspect

Phase 0. Probes topology.topology (in the schema of the installed extension, topology by default) with to_regclass and reads the topologies: { topologies => [ { name => ..., srid => ... } ] }, ordered by name; the schema of a topology has the name of the topology. undef when the table is not there (the extension is not installed). Read-only.

claims

Phase 1. [ schema => $name ] for each topology of the extension's own state; the driver's cascade takes the tables, columns, indexes, sequences and views of the schema. [] without state.

AUTHOR

DBIO Authors

COPYRIGHT AND LICENSE

Copyright (C) 2026 DBIO Authors

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.