[postgis-tickets] [SCM] PostGIS branch stable-3.2 updated. 3.2.0-26-gbd151029c

git at osgeo.org git at osgeo.org
Mon Jan 31 23:07:18 PST 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, stable-3.2 has been updated
       via  bd151029cf10ce1bd538749f739b5dc3729fb579 (commit)
      from  89ada38b166ca52d96db2c9a6621e7c06392936f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit bd151029cf10ce1bd538749f739b5dc3729fb579
Author: Regina Obe <lr at pcorp.us>
Date:   Tue Feb 1 02:07:09 2022 -0500

    Fix invalid tract load, turn off tabblock20 by default.  References #5041 for PostGIS 3.2.1

diff --git a/NEWS b/NEWS
index 59154ec06..4c6d9e0dc 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,8 @@ YYYY/MM/DD
   - #5046, Fix upgrades in absence of old library (Sandro Santilli)
   - #5063, Fix ST_Srid(TopoGeometry) against a set (Sandro Santilli)
   - #3056, spurious notice on ST_StartPoint(empty) (Paul Ramsey)
+  - #5041, postgis_tiger_geocoder: loader_generate_script
+           generates script with invalid syntax (Regna Obe)
 
 PostGIS 3.2.0 (Olivier Courtin Edition)
 2021/12/17
diff --git a/extras/tiger_geocoder/tiger_loader_2020.sql b/extras/tiger_geocoder/tiger_loader_2020.sql
index 6afce151a..2343fe15c 100644
--- a/extras/tiger_geocoder/tiger_loader_2020.sql
+++ b/extras/tiger_geocoder/tiger_loader_2020.sql
@@ -2,7 +2,7 @@
 -- PostGIS - Spatial Types for PostgreSQL
 -- http://postgis.net
 --
--- Copyright (C) 2012-2018 Regina Obe and Leo Hsu
+-- Copyright (C) 2012-2021 Regina Obe and Leo Hsu
 -- Paragon Corporation
 --
 -- This is free software; you can redistribute and/or modify it under
@@ -275,9 +275,8 @@ COMMENT ON COLUMN loader_lookuptables.website_root_override IS 'Path to use for
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude )
 VALUES(10, 'tract', 'tract', true, false, true,false, 'c',
 '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (tract_id) ) INHERITS(tiger.${lookup_name}); " ',
-	'${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid IF EXISTS TO tract_id;
-	ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid10 IF EXISTS TO tract_id;
-	SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); "
+	'${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid TO tract_id;"
+	${psql} -c "SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); "
 	${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);"
 	${psql} -c "VACUUM ANALYZE ${data_schema}.${state_abbrev}_${lookup_name};"
 	${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"', ARRAY['gid']);
@@ -292,7 +291,7 @@ ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_
 ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', '{gid, uatyp10, uatype, suffix1ce}'::text[]);
 
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude )
-VALUES(11, 'tabblock20', 'tabblock20', true, false, true,false, 'c',
+VALUES(11, 'tabblock20', 'tabblock20', false, false, true,false, 'c',
 '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (geoid)) INHERITS(tiger.${lookup_name});" ',
 '${psql} -c "SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); "
 ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"

-----------------------------------------------------------------------

Summary of changes:
 NEWS                                        | 2 ++
 extras/tiger_geocoder/tiger_loader_2020.sql | 9 ++++-----
 2 files changed, 6 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list