hi,i have this table:<br>CREATE TABLE pois(<br> uid integer not null, <br> name VARCHAR(128),<br> catcode VARCHAR(32) not null, <br> catname VARCHAR(32),<br> others VARCHAR(32)<br>);<br>SELECT AddGeometryColumn('pois', 'location', 4214, 'POINT', 2);<br>
<br>and then in my codes,i use this invoke to get location column in tuple:<br>tuple = heap_getnext(pHeapScanDesc,ForwardScanDirection);<br>datum = heap_getattr(tuple,6,pRawRelation->rd_att,&isnull);<br><br>then on the next,how to write to get Point? is this right?<br>
Point *p = isnull?NULL:(Point *)(PG_DETOAST_DATUM(datum)); <br>i've tried it,but it seems not work.<br><br>thanks a lot.<br><br>peng<br><br><br>