[postgis-users] tiger_geocoder import error

Jeff Rossi rossi.jeff at gmail.com
Tue May 22 11:11:23 PDT 2012


I can make a query to finish the import, but how would I fix the import
script so I don't have issues with the 49 other states.

On Tue, May 22, 2012 at 1:51 PM, Stephen Woodbridge [via PostGIS] <
ml-node+s17n4997671h12 at n6.nabble.com> wrote:

> Depends on if you just want to rename them or copy them!
>
> Rename like:
>
> create schema tiger_data;
> begin;
> -- first rename the table
> alter table tiger_staging.fl_tabblock10 rename fl_tabblock;
> -- then move it to the new schema
> alter table tiger_staging.fl_tabblock set schema tiger_data;
> commit;
>
> If there are name conflicts you can move it to the new schema then
> rename it. If you want to copy the data then look at commands like:
>
> create table tiger_data.fl_tabblock as select * from
> tiger_staging.fl_tabblock10;
>
> or
>
> insert into tiger_data.fl_tabblock (<column_list>) select <column_list>
> from tiger_staging.fl_tabblock10;
>
> -Steve W
>
> On 5/22/2012 11:46 AM, Jeff Rossi wrote:
>
> > Any idea how I can get the 480K records from tiger_staging.fl_tabblock10
> > to  tiger_data.fl_tabblock
> >
> > On Tue, May 22, 2012 at 8:47 AM, Mario Sileone [via PostGIS] <[hidden
> > email] </user/SendEmail.jtp?type=node&node=4997655&i=0>> wrote:
> >
> >     Dear Jeff:
> >              according to the error detailed
> >     ERROR:  INSERT has more expressions than target columns
> >              You Have:
> >
> the_geom,intptlon,intptlat,awater,aland,funcstat,uace,ur,mtfcc,name,tabblock_id,blockce,tractce,countyfp,statefp
>
> >
> >
> >     Which count 15 expressions and
> >
> >
> the_geom,intptlon10,intptlat10,awater10,aland10,funcstat10,uatyp10,uace10,ur10,mtfcc10,name10,tabblock_id,blockce10,tractce10,countyfp10,statefp10
>
> >
> >
> >     are 16 values.
> >
> >     So, or You have a missin expression or one more value, check this.
> >
> >     Best Regards
> >
> >
> >     El 22/05/2012 8:45, Jeff Rossi escribió:
> >
> >      > Sorry if this is a double post, had an issue with my mail server
> >     and had to
> >
> >      > use my personal email.
> >      >
> >      > This is my first project with postgresql/postgis and it is
> >     possible and
> >      > maybe even probable that I made an error.  I used pgadmin to
> >     generate import
> >      > scripts by state and started with florida. The errors are below:
> >      >
> >      > ####
> >      >
> >      > COMMIT
> >      > NOTICE:  INSERT INTO
> >      >
> >
> tiger_data.fl_tabblock(the_geom,intptlon,intptlat,awater,aland,funcstat,uace,ur,mtfcc,name,tabblock_id,blockce,tractce,countyfp,statefp)
>
> >
> >      > SELECT
> >      >
> >
> the_geom,intptlon10,intptlat10,awater10,aland10,funcstat10,uatyp10,uace10,ur10,mtfcc10,name10,tabblock_id,blockce10,tractce10,countyfp10,statefp10
>
> >
> >      > FROM tiger_staging.fl_tabblock10;
> >      > CONTEXT:  SQL function "loader_load_staged_data" statement 1
> >      > ERROR:  INSERT has more expressions than target columns
> >      > LINE 1:
> >     ...name10,tabblock_id,blockce10,tractce10,countyfp10,statefp10 ...
> >      >                                                              ^
> >      > QUERY:  INSERT INTO
> >      >
> >
> tiger_data.fl_tabblock(the_geom,intptlon,intptlat,awater,aland,funcstat,uace,ur,mtfcc,name,tabblock_id,blockce,tractce,countyfp,statefp)
>
> >
> >      > SELECT
> >      >
> >
> the_geom,intptlon10,intptlat10,awater10,aland10,funcstat10,uatyp10,uace10,ur10,mtfcc10,name10,tabblock_id,blockce10,tractce10,countyfp10,statefp10
>
> >
> >      > FROM tiger_staging.fl_tabblock10;
> >      > CONTEXT:  PL/pgSQL function "loader_load_staged_data" line 24 at
> >     EXECUTE
> >      > statement
> >      > SQL function "loader_load_staged_data" statement 1
> >      >
> >      > ####
> >      >
> >      > It appears to me that the extra column is uatyp10
> >      >
> >      > Many Thanks for your Assistance,
> >      >
> >      > Jeff
> >      >
> >      > --
> >      > View this message in context:
> >
> http://postgis.17.n6.nabble.com/tiger-geocoder-import-error-tp4997634.html
> >      > Sent from the PostGIS - User mailing list archive at Nabble.com.
> >      > _______________________________________________
> >      > postgis-users mailing list
> >      > [hidden email]
> >     <http://user/SendEmail.jtp?type=node&node=4997640&i=0>
> >      > http://postgis.refractions.net/mailman/listinfo/postgis-users
> >      >
> >
> >
> >     --
> >     Mario Sileone
> >     _______________________________________________
> >     postgis-users mailing list
> >     [hidden email] <http://user/SendEmail.jtp?type=node&node=4997640&i=1>
>
> >     http://postgis.refractions.net/mailman/listinfo/postgis-users
>
> >
> >
> >     If you reply to this email, your message will be added to the
> >     discussion below:
> >
> http://postgis.17.n6.nabble.com/tiger-geocoder-import-error-tp4997634p4997640.html
> >
> >     To unsubscribe from tiger_geocoder import error, click here.
> >     NAML
> >     <
> http://postgis.17.n6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
> >
> >
> >
> >
> >
> > --
> > Regards
> >
> > Jeff Rossi
> >
> > Intouch MVC
> > 1506 Tuscaloosa Ave
> > Holly Hill, FL 32117
> > (386) 226-8979
> >
> > View this message in context: Re: tiger_geocoder import error
> > <
> http://postgis.17.n6.nabble.com/tiger-geocoder-import-error-tp4997634p4997655.html>
>
> > Sent from the PostGIS - User mailing list archive
> > <http://postgis.17.n6.nabble.com/PostGIS-User-f3516033.html> at
> Nabble.com.
> >
> >
> > _______________________________________________
> > postgis-users mailing list
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=4997671&i=0>
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
>
> _______________________________________________
> postgis-users mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=4997671&i=1>
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://postgis.17.n6.nabble.com/tiger-geocoder-import-error-tp4997634p4997671.html
>  To unsubscribe from tiger_geocoder import error, click here<http://postgis.17.n6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4997634&code=cm9zc2kuamVmZkBnbWFpbC5jb218NDk5NzYzNHwtNjQ5NjEzMjk4>
> .
> NAML<http://postgis.17.n6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
Regards

Jeff Rossi

Intouch MVC
1506 Tuscaloosa Ave
Holly Hill, FL 32117
(386) 226-8979


--
View this message in context: http://postgis.17.n6.nabble.com/tiger-geocoder-import-error-tp4997634p4997672.html
Sent from the PostGIS - User mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120522/8634b932/attachment.html>


More information about the postgis-users mailing list