[postgis-users] Newbie: census_loader.sql Issue

Michael Papet mpapet at yahoo.com
Thu Nov 8 08:04:35 PST 2012


 This is an update on my issues loading Tiger2011 data to postGIS using Debian's Wheezy, Postgresql 9.1.  After starting over from the beginning, I'm down to one error loading data using the included loader scripts as-is. Table tiger.bg doesn't get made on my system with no clue that bg didn't get made unless I check my log file.



psql -d geocoder  -f /home/postgis/postgis/postgis-2.1.0SVN/extras/tiger_geocoder/tiger_2011/census_loader.sql                    setsearchpathforinstall
------------------------------------------
 tiger has been made primary for install
(1 row)

CREATE FUNCTION
psql:/home/postgis/postgis/postgis-2.1.0SVN/extras/tiger_geocoder/tiger_2011/census_loader.sql:108: NOTICE:  function loader_generate_census(text[],text) does not exist, skipping
DROP FUNCTION
CREATE FUNCTION
DELETE 3
INSERT 0 1
INSERT 0 1
INSERT 0 1


There's no bg table made.  If I change the stanza from CREATE TABLE bg to CREATE TABLE tiger.bg, there's still nothing made and no error in postgresql logs!  If I take the bg table query out and put it in an editor without the RETURN stanza, the table is made.


Here's the error from the logs using CREATE TABLE bg


2012-11-08 07:30:20 PST ERROR:  syntax error at or near "RETURN" at character 806
2012-11-08 07:30:20 PST STATEMENT:  CREATE TABLE bg
                (
                  gid serial NOT NULL,
                  statefp varchar(2),
                  countyfp varchar(3),
                  tractce varchar(6),
                  blkgrpce varchar(1),
                  bg_id varchar(12) PRIMARY KEY,
                  namelsad varchar(13),
                  mtfcc varchar(5),
                  funcstat varchar(1),
                  aland double precision,
                  awater double precision,
                  intptlat varchar(11),
                  intptlon varchar(12),
                  the_geom geometry,
                  CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2),
                  CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL),
                  CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269)
                );
                COMMENT ON TABLE tiger.bg IS 'block groups';
                RETURN 'Done creating census tract base tables - $Id: census_loader.sql 10179 2012-08-13 21:45:39Z robe $';
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20121108/106a785f/attachment.html>


More information about the postgis-users mailing list