how to calculate the overlap area?
select ST_Area(ST_Overlaps(geometrya, geometryb)::geometry) from table_name;
Error Message cannot cast type boolean to geometry
ST_OVERLAPS
returns a boolean indicating if the geometries do or not overlap each other. To get the geometry of the intersection you can use ST_INTERSECTION
select ST_Area(ST_INTERSECTION(geometrya, geometryb)) from table_name
WHERE ST_Overlaps(geometrya, geometryb);