<div dir="ltr"><span class="gmail-gI"><span>Hai,<br>When I run my code, each time the memory reaches its limit and the system gets stuck. There is no output. This is my code. I am using PostGIS from psycopg2.<br><br>iin="""WITH a AS (<br>SELECT * FROM alappuzhanew1<br>WHERE filename = 'part3'<br>AND ST_IsValid(geom::geometry)),<br>b AS (<br>SELECT * FROM alappuzhanew2<br>WHERE filename = 'part4'<br>AND ST_IsValid(geom::geometry))<br>SELECT<br>    CASE<br>    WHEN ST_CoveredBy(a.geom, b.geom)<br>        THEN a.geom<br>    WHEN ST_CoveredBy(b.geom, a.geom)<br>        THEN b.geom<br>    ELSE<br>        ST_Intersection(a.geom, b.geom)<br>    END as geom<br>FROM a,b ;"""<br>curs.execute(iin)<br><br>Is there any fault with the code. Please help me....<br></span></span></div>