QGIS Processing toolbox is extremely flexible and it allows easily to implement QGIS tools (with a GUI) that are based on command line utilities (see this and this).

When the underlying command line program is ogr2ogr (or any other GDAL/OGR utility) possibilities become endeless. For example ogr2ogr can be used to convert formats or run arbitrary (Spatial) SQL queries.

One possibility is to run Spatial SQL queries using input PostGIS layers and getting as output a PostGIS layer. The intersting bit is that the Spatial SQL query will be run by the server/machine (where the input layers are stored), so possibly not by the destkop machine where you are running ogr2ogr.

Usually to run a (Spatial) SQL query in PostGIS a user would open one of the many SQL shells available (PgAdmin, QGIS DB Manager, phppgadmin, psql, etc.) and run something like the following:

SELECT attribute1,(ST_Dump(ST_Union(a.geom))).geom::geometry(Polygon,4326) as geom
FROM input_table a
GROUP BY attribute1;

and that is ok for us geo-geeks, but what about average Jane/Joe?

Isn’t this much easier?

Dissolve PostGIS polygons
Dissolve PostGIS polygons

With this plugin for the QGIS Processing toolbox (available in the official QGIS plugin repository) we aim to bring into QGIS a set of tools to allow basic PostGIS users to run common queries (Dissolve, Clip, Difference, etc.), using as input PostGIS layer and getting as output PostGIS layer(s).

PostGIS QGIS Processing tools
PostGIS QGIS Processing tools

Please note that the plugin is still in the early stages of development and that it will be greatly improved once the Processing toolbox will support features like multi-attribute selection, adding to (QGIS) map output layers other than shapefiles, and others.