I have 4 vertices and I need to get the bounding box something like the one in the image below. A, B, C and D are the vertices.
The red area is the one which I need to eliminate while I only need to retain the green area.
Maybe, I would need ST_Intersects, but I'm not sure how do I go about using this for the mentioned use.
NOTE I will need the points A, B, C and D as part of the green area, I do not want to eliminate them, I only need to get rid of the center part which is in red.