Hi, Stephen,<br><br>It looks like that there are more problems than I expected. I tried to run "geocde" and it returned a geom object. Then I created a tmp_geocode_result table that has the same structure of the returned cursor and a function to display the coordinates of the geom object. However, I keep getting the message "ERROR:  value too long for type character varying(90)" when running my function. It seems that the tmp table doesn't have the exact same structure as the cursor and the geom object was filled into a wrong place. I listed the table tmp_geocode_result and the function below. Could you give me some advise? Thanks.
<br><br>CREATE TABLE tmp_geocode_result (<br>   id      INTEGER,<br>   tlid    INTEGER,<br>   fedirp  VARCHAR(2),<br>   fename  VARCHAR(30),<br>   fetype  VARCHAR(4),<br>   fedirs  VARCHAR(2),<br>   zip     INTEGER,<br>   state   VARCHAR(2),
<br>   county  VARCHAR(90),<br>   cousub  VARCHAR(90),<br>   place   VARCHAR(90),<br>   rating  INTEGER<br>);<br><br>SELECT AddGeometryColumn('tmp_geocode_result','address_geom',4269,'POINT',3);<br>
<br><br>CREATE OR REPLACE FUNCTION geocode_test(add VARCHAR) RETURNS VARCHAR AS $$<br>DECLARE<br>    result tmp_geocode_result%ROWTYPE;<br>    cursor1 refcursor;<br>BEGIN<br>    cursor1 := geocode(cursor1,add);<br>    FETCH cursor1 into result;
<br>    RETURN AsText(result.address_geom);<br>END;<br>$$ LANGUAGE plpgsql<br><br><br><div><span class="gmail_quote">On 6/28/07, <b class="gmail_sendername">Shuo Liu</b> <<a href="mailto:delphet@gmail.com">delphet@gmail.com
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi, All,<br><br>I'm working on a GIS project and trying to use TIGER Geocoder from the refractions website on TIGER data. The two sql files in the Geocoder generated some errors when being loaded, complaining that some tables ("gazetteer_places", "tiger_geocode_roads", "place_lookup", "roads_local", and "countysub_lookup") are missing. Some messages from the mailing list say that gazetteer tables should be loaded from the Census Bureau gazetteer files. But that doesn't help find "tiger_geocode_roads" and "roads_local" which don't exist in the loaded TIGER database. I used ogr2ogr to load the TIGER data (
<a href="http://docs.codehaus.org/display/GEOSDOC/Loading+TIGER+basedata" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://docs.codehaus.org/display/GEOSDOC/Loading+TIGER+basedata</a>) and it seems that some fields required by the Geocoder are in "completechain" but not all. Can anybody who have experience share some hint on this problem? Thank you very much.
<br><br>Marvin<br>
</blockquote></div><br>