Nombre

Populate_Topology_Layer — Agrega entradas faltantes a la tabla topology.layer mediante la lectura de metadatos de las tablas de topo.

Sinopsis

setof record Populate_Topology_Layer();

Description

Agrega las entradas faltantes a la tabla topology.layer inspeccionando las restricciones de topología en las tablas. Esta función es útil para arreglar las entradas de catálogo de topología después de la restauración de esquemas con datos topo.

Devuelve la lista de entradas creadas. Las columnas devueltas son schema_name, table_name, feature_column.

Disponibilidad: 2.3.0

Ejemplos

Code
SELECT CreateTopology('strk_topo');
CREATE SCHEMA strk;
CREATE TABLE strk.parcels(gid serial, parcel_id varchar(20) PRIMARY KEY, address text);
SELECT topology.AddTopoGeometryColumn('strk_topo', 'strk', 'parcels', 'topo', 'POLYGON');
Output
createtopology
----------------
              1
(1 row)

CREATE SCHEMA
CREATE TABLE
 addtopogeometrycolumn
-----------------------
                     1
(1 row)

This query returns no records because the feature is already registered.

Code
SELECT *
FROM topology.Populate_Topology_Layer();
Output
(0 rows)

Rebuild the topology layer catalog.

Code
TRUNCATE TABLE topology.layer;
Output
TRUNCATE TABLE
Code
SELECT *
FROM topology.Populate_Topology_Layer();
Output
schema_name | table_name | feature_column
-------------+------------+----------------
 strk        | parcels    | topo
(1 row)
Code
SELECT topology_id, layer_id,
       schema_name AS sn, table_name AS tn, feature_column AS fc
FROM topology.layer;
Output
topology_id | layer_id |  sn  |   tn    |  fc
-------------+----------+------+---------+------
           1 |        1 | strk | parcels | topo
(1 row)

Ver también

AddTopoGeometryColumn