I have a set of geometry in my PostgreSQL table that consists of Points, Linestrings & Polygons. From this set I need to create a subset of geometries which intersects with each other. I need a method without looping through each one of them as there can be more than 1000 geometries at once.
I need to fetch the geometries that are marked in red in this image