There are two output functions in PostGIS Topology: topology.ST_AsGML and topology.ST_AsTopoJSON. GML is an OGC standard, while TopoJSON is a GeoJSON-like text-based exchange format. It was designed to reduce the size and redundancy of GeoJSON for datasets composed of neighboring polygons.
Topology output
GML output
Topological GML can be retrieved from the database using the topology.AsGML function. The simplest use case is to supply a single argument, the TopoGeometry column:
SELECT topology.AsGML(topogeom) FROM countries WHERE name='Nulland';
<gml:TopoSurface><gml:directedFace><gml:Face gml:id="F4258"><gml:directedEdge orientation="-"><gml:Edge gml:id="E4766"><gml:directedNode orientation...