[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0rc1-76-gc050404
git at osgeo.org
git at osgeo.org
Sat Feb 13 21:47:34 PST 2021
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, master has been updated
via c05040400c0f166910f6c907e1c342b4ef4b9934 (commit)
from 639b2f9bc23836b5c32cf68c4375a7cca5df6325 (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 c05040400c0f166910f6c907e1c342b4ef4b9934
Author: Regina Obe <lr at pcorp.us>
Date: Sun Feb 14 00:47:25 2021 -0500
Add costs and parallel safe, take out join_collapse seems to be often faster without it
diff --git a/extras/tiger_geocoder/geocode/geocode_address.sql b/extras/tiger_geocoder/geocode/geocode_address.sql
index 20dc783..f7598b3 100644
--- a/extras/tiger_geocoder/geocode/geocode_address.sql
+++ b/extras/tiger_geocoder/geocode/geocode_address.sql
@@ -432,5 +432,4 @@ BEGIN
END;
$$
LANGUAGE 'plpgsql' STABLE COST 1000 ROWS 50 PARALLEL SAFE;
-ALTER FUNCTION geocode_address(IN norm_addy, IN integer, IN geometry) SET join_collapse_limit='2';
diff --git a/extras/tiger_geocoder/geocode/geocode_location.sql b/extras/tiger_geocoder/geocode/geocode_location.sql
index 8595ca3..c99ee3d 100644
--- a/extras/tiger_geocoder/geocode/geocode_location.sql
+++ b/extras/tiger_geocoder/geocode/geocode_location.sql
@@ -95,4 +95,4 @@ BEGIN
RETURN;
END;
-$_$ LANGUAGE plpgsql STABLE COST 100;
+$_$ LANGUAGE plpgsql STABLE COST 20 ROWS 5 PARALLEL SAFE;
diff --git a/extras/tiger_geocoder/geocode/includes_address.sql b/extras/tiger_geocoder/geocode/includes_address.sql
index 2637d1c..eac0f6d 100644
--- a/extras/tiger_geocoder/geocode/includes_address.sql
+++ b/extras/tiger_geocoder/geocode/includes_address.sql
@@ -90,4 +90,4 @@ BEGIN
-- The address is not within the range
RETURN FALSE;
END;
-$_$ LANGUAGE plpgsql IMMUTABLE COST 100;
+$_$ LANGUAGE plpgsql IMMUTABLE COST 20 PARALLEL SAFE;
diff --git a/extras/tiger_geocoder/geocode/interpolate_from_address.sql b/extras/tiger_geocoder/geocode/interpolate_from_address.sql
index 04f2f99..3587e97 100644
--- a/extras/tiger_geocoder/geocode/interpolate_from_address.sql
+++ b/extras/tiger_geocoder/geocode/interpolate_from_address.sql
@@ -91,7 +91,7 @@ BEGIN
--RAISE NOTICE 'start: %, center: %, new: %, side: %, offset: %, az: %', ST_AsText(ST_Transform(ST_StartPoint(road),ST_SRID(in_road))), ST_AsText(ST_Transform(center_pt,ST_SRID(in_road))),ST_AsText(result), in_side, in_offset_m, az;
RETURN result;
END;
-$_$ LANGUAGE plpgsql IMMUTABLE COST 10;
+$_$ LANGUAGE plpgsql IMMUTABLE COST 10 PARALLEL SAFE;
-- needed to ban stupid warning about how we are using deprecated functions
-- yada yada yada need this to work in 2.0 too bah
ALTER FUNCTION interpolate_from_address(integer, character varying, character varying, geometry, character varying, double precision)
diff --git a/extras/tiger_geocoder/geocode/other_helper_functions.sql b/extras/tiger_geocoder/geocode/other_helper_functions.sql
index 7d3d288..c7303e7 100644
--- a/extras/tiger_geocoder/geocode/other_helper_functions.sql
+++ b/extras/tiger_geocoder/geocode/other_helper_functions.sql
@@ -18,7 +18,7 @@ CREATE OR REPLACE FUNCTION greatest_hn(fromhn varchar, tohn varchar)
RETURNS integer AS
$$ SELECT greatest(to_number( CASE WHEN trim($1) ~ '^[0-9]+$' THEN $1 ELSE '0' END,'99999999'),to_number(CASE WHEN trim($2) ~ '^[0-9]+$' THEN $2 ELSE '0' END,'99999999') )::integer; $$
LANGUAGE sql IMMUTABLE
- COST 200;
+ COST 200 PARALLEL SAFE;
-- Returns an absolute difference between two zips
-- This is generally more efficient than doing levenshtein
@@ -28,7 +28,7 @@ CREATE OR REPLACE FUNCTION diff_zip(zip1 varchar, zip2 varchar)
RETURNS integer AS
$$ SELECT abs(to_number( CASE WHEN trim(substring($1,1,5)) ~ '^[0-9]+$' THEN $1 ELSE '0' END,'99999')::integer - to_number( CASE WHEN trim(substring($2,1,5)) ~ '^[0-9]+$' THEN $2 ELSE '0' END,'99999')::integer )::integer; $$
LANGUAGE sql IMMUTABLE STRICT
- COST 200;
+ COST 200 PARALLEL SAFE;
-- function return true or false if 2 numeric streets are equal such as 15th St, 23rd st
-- it compares just the numeric part of the street for equality
@@ -44,7 +44,7 @@ $$
AND trim(substring($1, E'^[0-9\/\s]+')) = trim(substring($2, E'^[0-9\/\s]+')), false);
$$
LANGUAGE sql IMMUTABLE
-COST 5;
+COST 5 PARALLEL SAFE;
-- Generate script to drop all non-primary unique indexes on tiger and tiger_data tables
CREATE OR REPLACE FUNCTION drop_indexes_generate_script(tiger_data_schema text DEFAULT 'tiger_data')
@@ -245,4 +245,4 @@ $$
SELECT lpad((to_number( CASE WHEN trim(substring($1,1,5)) ~ '^[0-9]+$' THEN $1 ELSE '0' END,'99999')::integer + i)::text, 5, '0')::varchar
FROM generate_series($2, $3) As i );
$$
-LANGUAGE sql IMMUTABLE STRICT;
\ No newline at end of file
+LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE;
-----------------------------------------------------------------------
Summary of changes:
extras/tiger_geocoder/geocode/geocode_address.sql | 1 -
extras/tiger_geocoder/geocode/geocode_location.sql | 2 +-
extras/tiger_geocoder/geocode/includes_address.sql | 2 +-
extras/tiger_geocoder/geocode/interpolate_from_address.sql | 2 +-
extras/tiger_geocoder/geocode/other_helper_functions.sql | 8 ++++----
5 files changed, 7 insertions(+), 8 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list