add_managed_object_reference_fields(_schema_name text, _table_name text, _add_optional_fields boolean DEFAULT true)


Description

Add the reference fields needed by the managed objects functions to the given table, depending on its geometry type. The geometry type is read from the table road_graph.managed_objects if the table is registered, or else from its geometry column geom. * all the geometry types: road_code (text), and the optional fields offset (real) and side (text), * point: marker_code (integer), abscissa (real), and the optional field cumulative (real), * linestring and multilinestring: start_marker_code, end_marker_code (integer), start_abscissa, end_abscissa (real), and the optional fields start_cumulative, end_cumulative (real). The optional fields are added only if the parameter _add_optional_fields is True (default). The existing fields are not modified. The function returns one line per field with its name, type and status: added, already exists, or already exists with the type of the existing field. If the fields cannot be added, it returns one line with the status: table not found, geom column not found, or geometry type not supported.

Parameters

Name Type Mode
_schema_name text IN
_table_name text IN
_add_optional_fields boolean IN
field_name text TABLE
field_type text TABLE
field_status text TABLE

Definition