[postgis-users] Errors populating tiger data on windows
Jonathan Haglund
jonathan.haglund at gotravelsites.com
Tue Sep 10 13:54:31 PDT 2013
Hello all,
I am using the stock tiger scripts from PostgreSQL 9.2/PostGIS 2.0.3 64
bit on Windows Server 2008 R2. I edited them to use my password and
file paths. Running the "create_geocode.bat" script creates the tables
fine, though it throws errors saying some things already exist. I then
ran "SELECT loader_generate_script(ARRAY['HI'], 'windows');" and
executed that. Its fine for awhile, but eventually I get the following:
ERROR: current transaction is aborted, commands ignored until end of
transaction block
If I break execution I get more info (line breaks edited after pasting
from the cmd prompt):
NOTICE: INSERT INTO
tiger_data.hi_featnames(tlid,paflag,mtfcc,linearid,sufqual,suftyp,sufdir,prequal,pretyp,predir,sufqualabr,suftypabrv,sufdirabrv,prequalabr,
pretypabrv,predirabrv,name,fullname)
SELECT
paflag,mtfcc,linearid,sufqual,suftyp,sufdir,prequal,pretyp,predir,sufqualabr,suftypabrv,sufdirabrv,prequalabr,pretypabrv,predirabrv,name,fullname,tlid
FROM tiger_staging.hi_featnames;
CONTEXT: SQL function "loader_load_staged_data" statement 1
ERROR: column "tlid" is of type bigint but expression is of type
character varying
LINE 1: ...alabr,pretypabrv,predirabrv,name,fullname) SELECT paflag,mtf...
^
HINT: You will need to rewrite or cast the expression.
QUERY: INSERT INTO
tiger_data.hi_featnames(tlid,paflag,mtfcc,linearid,sufqual,suftyp,sufdir,prequal,pretyp,predir,sufqualabr,suftypabrv,sufdirabrv,prequalabr,pretypabrv,predirabrv,name,fullname)
SELECT
paflag,mtfcc,linearid,sufqual,suftyp,sufdir,prequal,pretyp,predir,sufqualabr,suftypabrv,sufdirabrv,prequalabr,pretypabrv,predirabrv,name,fullname,tlid
FROM tiger_staging.hi_featnames;
CONTEXT: PL/pgSQL function loader_load_staged_data(text,text,text[])
line 24 at
EXECUTE statement
SQL function "loader_load_staged_data" statement 1
I have followed the instructions, started over many times in case I
messed up somewhere, but some things I noticed: The docs refer to
tiger2010, but only 2011 and 2012 scripts are present, within the 2011
folder. The "create_geocode.bat" script by default refers to
"tiger_loader_2012.sql" which is what I left it as. Not every state
throws this error, but most of them do. If I ignore it and let it
finish geocoding technically seems to work, but I have no way of knowing
if my data is incomplete.
I can find no other reference to this issue and since I am using the
scripts as they came to me through the application stack builder I have
no idea what to do. Please let me know if you need more information.
-Jonathan
More information about the postgis-users
mailing list