[postgis-tickets] [PostGIS] #3347: Loader functions rely on the order of columns be returned in ordinal_position order

PostGIS trac at osgeo.org
Sat Oct 24 14:56:31 PDT 2015


#3347: Loader functions rely on the order of columns be returned in
ordinal_position order
-----------------------------+---------------------------
  Reporter:  robe            |      Owner:  robe
      Type:  defect          |     Status:  reopened
  Priority:  blocker         |  Milestone:  PostGIS 2.2.1
 Component:  tiger geocoder  |    Version:  trunk
Resolution:                  |   Keywords:
-----------------------------+---------------------------
Description changed by robe:

Old description:

> I'm not sure how I could have missed this.  Might have been something
> changed in tiger data, but the county tables no longer loading.
>
> Issue is as part of script I rename
>

> {{{
> ALTER TABLE tiger_staging.county RENAME geoid TO cntyidfp;
> }}}
>
> and that is causing issues since ctyidfp exists in county tables.

New description:

 UPDATE:

 ----

 The real issue is that the tiger.loader_load_staged_data function does not
 enforce order of return of columns and evidentally the ALTER RENAME and if
 your database has enough columns changes its preferred order of return of
 column names from informaton_schema.columns.  The fix is to force the
 order by ordinal_position.

 ----



 I'm not sure how I could have missed this.  Might have been something
 changed in tiger data, but the county tables no longer loading.

 Issue is as part of script I rename


 {{{
 ALTER TABLE tiger_staging.county RENAME geoid TO cntyidfp;
 }}}

 and that is causing issues since ctyidfp exists in county tables.

--

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3347#comment:3>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list