What is the PostGIS / PostgreSQL equivalent of the [GeoPandas Overlay Union operation][1]? res_union = geopandas.overlay(df1, df2, how='union') Say I have two tables, 1 green, 1 red with each with two rows with geometry (polygons): [![enter image description here][2]][2] Then, the objective is to get: [![enter image description here][3]][3] which is a table with 7 rows/ features. See the GeoPandas [docs][1] for more info. I've tried spatial [joins][4] and using the [ST_Union][5] and ST_Intersection to no avail. I managed to reproduce the equivalent of res_intersection = geopandas.overlay(df1, df2, how='intersection') Which is the equivalent of: [![enter image description here][6]][6] using the following SQL command: SELECT table1.letter, table2.number, ST_Intersection(table1.geom,table2.geom) FROM table1, table2 WHERE ST_Intersects(table1.geom,table2.geom) One solution is to create a table for the intersections and one for the symmetrical differences and than outer join. However I don't know how to create the Symmetrical Difference: SELECT test.hybas_nld.pfaf_id, test.gadm_nld.gid_1, ST_SymDifference(test.hybas_nld.geom,test.gadm_nld.geom) FROM test.hybas_nld, test.gadm_nld WHERE ST_????(test.hybas_nld.geom,test.gadm_nld.geom) with the result of: [![enter image description here][7]][7] Possible [duplicate][8] with the exception that I would like to keep the polygons where only geometry of table 1 or 2 exists (symmetrical difference). What would be the simplest and fastest way to get to the final result (Union)? [1]: http://geopandas.org/set_operations.html [2]: https://i.sstatic.net/NKHRF.png [3]: https://i.sstatic.net/O53mR.png [4]: http://revenant.ca/www/postgis/workshop/joins.html [5]: https://postgis.net/docs/ST_Union.html [6]: https://i.sstatic.net/Hp5cv.png [7]: https://i.sstatic.net/VgF7s.png [8]: https://gis.stackexchange.com/questions/112498/postgis-overlay-style-union-not-dissolve-style