Maintaining topology in the vector layers is very important; this results in greater data integrity and leads to more accurate analysis results. This recipe shows you how to edit PostGIS topology layers (in other words, layers with topology objects, such as edges, faces, and nodes) with QGIS.
Installation of PostGIS with topology support won't be covered in detail here because instructions for the different operating systems can be found on the project website at http://postgis.net/docs/manual-2.1/postgis_installation.html. If you are using Windows, PostGIS can be installed directly from the Stack Builder application, which is provided by the standard PostgreSQL installation, as described at http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgis_tut01.
To follow this exercise, you need a PostGIS database with topology enabled. In QGIS, you should set up the connection to the database using the New button in the Add PostGIS Layers dialog.
Also, it is necessary to install and activate the PostGIS Topology Editor plugin.
These steps will create a topology-enabled vector layer in your PostGIS database:

topology.sql file and click on Execute (F5) to run the queries.topo1 table in Tree.topo1 table in Tree and go to Schema | TopoViewer to load all the topology layers into QGIS. The result should look like the following:
Once the topology is ready and loaded into QGIS, we can edit it with the PostGIS Topology Editor plugin. It is worth mentioning that, currently, the plugin allows us only to delete nodes and edges. Other editing operations are not supported.
To delete a node, perform the following steps:
Nodes group and select the topo1.node layer.To delete edges, perform the following steps:
Edges group and select the edge layer that you want to edit, for example, the topo1.edge layer.As QGIS currently does not support dynamic updates of topology, it is necessary to reload topology layers with TopoViewer to reflect our edits:
topo1 table in the tree, and go to Schema | TopoViewer to load all topology layers into QGIS:
You will see that the previously deleted nodes and edges now disappear.
The PostGIS Topology Editor plugin issues SQL queries directly to the corresponding topology tables in the PostGIS database to remove edges and nodes.