[postgis-tickets] [SCM] PostGIS branch stable-3.0 updated. 3.0.5-10-gd5d3dfe8f
git at osgeo.org
git at osgeo.org
Sun Jul 17 15:42:47 PDT 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.0 has been updated
via d5d3dfe8f558485cf63037601a5dc114ca21f4e1 (commit)
via 05eb430e0b2a9483e1aa850523b2584dcf08baa1 (commit)
via e7dae9e51b539d3dc3fa80dece35a1512660e36a (commit)
from d8786601e26fc67747dc2acbfe3cdc78c96883fc (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 d5d3dfe8f558485cf63037601a5dc114ca21f4e1
Author: Regina Obe <lr at pcorp.us>
Date: Sun Jul 17 18:33:12 2022 -0400
Search path and schema qual changes. Closes #5150 Closes #5155 for PostGIS 3.0.6
diff --git a/NEWS b/NEWS
index 8e00d0c0a..1149e19fb 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-PostGIS 3.0.6dev
+PostGIS 3.0.6
2022/XX/XX
* Bug Fixes and Enhancements *
@@ -11,6 +11,8 @@ PostGIS 3.0.6dev
- #5120, Fix not-null result from ST_EstimatedExtent against
truncated tables with spatial index (Sandro Santilli)
- #5151, garden crash ST_SetPoint with empty geometries (Regina Obe)
+ - #5150, Change signature of AddToSearchPath (Regina Obe)
+ - #5155, More schema qual fixes (Regina Obe)
PostGIS 3.0.5
2022/02/02
diff --git a/extensions/postgis_extension_helper.sql b/extensions/postgis_extension_helper.sql
index 60af72748..3f90683e8 100644
--- a/extensions/postgis_extension_helper.sql
+++ b/extensions/postgis_extension_helper.sql
@@ -28,50 +28,50 @@ DECLARE
var_class text := '';
var_is_aggregate boolean := false;
var_sql_list text := '';
- var_pgsql_version integer := current_setting('server_version_num');
+ var_pgsql_version integer := pg_catalog.current_setting('server_version_num');
BEGIN
- var_class := CASE WHEN pg_catalog.lower(param_type) = 'function' OR pg_catalog.lower(param_type) = 'aggregate' THEN 'pg_proc' ELSE '' END;
- var_is_aggregate := CASE WHEN pg_catalog.lower(param_type) = 'aggregate' THEN true ELSE false END;
+ var_class := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'function' OR pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN 'pg_catalog.pg_proc' ELSE '' END;
+ var_is_aggregate := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN true ELSE false END;
- IF var_pgsql_version < 110000 THEN
- var_sql_list := $sql$SELECT 'ALTER EXTENSION ' || e.extname || ' DROP ' || $3 || ' ' || COALESCE(proc.proname || '(' || oidvectortypes(proc.proargtypes) || ')' ,typ.typname, cd.relname, op.oprname,
- cs.typname || ' AS ' || ct.typname || ') ', opcname, opfname) || ';' AS remove_command
+ IF var_pgsql_version OPERATOR(pg_catalog.<) 110000 THEN
+ var_sql_list := $sql$SELECT 'ALTER EXTENSION ' OPERATOR(pg_catalog.||) e.extname OPERATOR(pg_catalog.||) ' DROP ' OPERATOR(pg_catalog.||) $3 OPERATOR(pg_catalog.||) ' ' OPERATOR(pg_catalog.||) COALESCE(proc.proname OPERATOR(pg_catalog.||) '(' OPERATOR(pg_catalog.||) oidvectortypes(proc.proargtypes) OPERATOR(pg_catalog.||) ')' ,typ.typname, cd.relname, op.oprname,
+ cs.typname OPERATOR(pg_catalog.||) ' AS ' OPERATOR(pg_catalog.||) ct.typname OPERATOR(pg_catalog.||) ') ', opcname, opfname) OPERATOR(pg_catalog.||) ';' AS remove_command
FROM pg_catalog.pg_depend As d INNER JOIN pg_catalog.pg_extension As e
- ON d.refobjid = e.oid INNER JOIN pg_catalog.pg_class As c ON
- c.oid = d.classid
- LEFT JOIN pg_catalog.pg_proc AS proc ON proc.oid = d.objid
- LEFT JOIN pg_catalog.pg_type AS typ ON typ.oid = d.objid
- LEFT JOIN pg_catalog.pg_class As cd ON cd.oid = d.objid
- LEFT JOIN pg_operator As op ON op.oid = d.objid
- LEFT JOIN pg_catalog.pg_cast AS ca ON ca.oid = d.objid
- LEFT JOIN pg_catalog.pg_type AS cs ON ca.castsource = cs.oid
- LEFT JOIN pg_catalog.pg_type AS ct ON ca.casttarget = ct.oid
- LEFT JOIN pg_opclass As oc ON oc.oid = d.objid
- LEFT JOIN pg_opfamily As ofa ON ofa.oid = d.objid
- WHERE d.deptype = 'e' and e.extname = $1 and c.relname = $2 AND COALESCE(proc.proisagg, false) = $4;$sql$;
+ ON d.refobjid OPERATOR(pg_catalog.=) e.oid INNER JOIN pg_catalog.pg_class As c ON
+ c.oid OPERATOR(pg_catalog.=) d.classid
+ LEFT JOIN pg_catalog.pg_proc AS proc ON proc.oid OPERATOR(pg_catalog.=) d.objid
+ LEFT JOIN pg_catalog.pg_type AS typ ON typ.oid OPERATOR(pg_catalog.=) d.objid
+ LEFT JOIN pg_catalog.pg_class As cd ON cd.oid OPERATOR(pg_catalog.=) d.objid
+ LEFT JOIN pg_catalog.pg_operator As op ON op.oid OPERATOR(pg_catalog.=) d.objid
+ LEFT JOIN pg_catalog.pg_cast AS ca ON ca.oid OPERATOR(pg_catalog.=) d.objid
+ LEFT JOIN pg_catalog.pg_type AS cs ON ca.castsource OPERATOR(pg_catalog.=) cs.oid
+ LEFT JOIN pg_catalog.pg_type AS ct ON ca.casttarget OPERATOR(pg_catalog.=) ct.oid
+ LEFT JOIN pg_catalog.pg_opclass As oc ON oc.oid OPERATOR(pg_catalog.=) d.objid
+ LEFT JOIN pg_catalog.pg_opfamily As ofa ON ofa.oid OPERATOR(pg_catalog.=) d.objid
+ WHERE d.deptype OPERATOR(pg_catalog.=) 'e' and e.extname OPERATOR(pg_catalog.=) $1 and c.relname OPERATOR(pg_catalog.=) $2 AND COALESCE(proc.proisagg, false) OPERATOR(pg_catalog.=) $4;$sql$;
ELSE -- for PostgreSQL 11 and above, they removed proc.proisagg among others and replaced with some func type thing
- var_sql_list := $sql$SELECT 'ALTER EXTENSION ' || e.extname || ' DROP ' || $3 || ' ' || COALESCE(proc.proname || '(' || oidvectortypes(proc.proargtypes) || ')' ,typ.typname, cd.relname, op.oprname,
- cs.typname || ' AS ' || ct.typname || ') ', opcname, opfname) || ';' AS remove_command
+ var_sql_list := $sql$SELECT 'ALTER EXTENSION ' OPERATOR(pg_catalog.||) e.extname OPERATOR(pg_catalog.||) ' DROP ' OPERATOR(pg_catalog.||) $3 OPERATOR(pg_catalog.||) ' ' OPERATOR(pg_catalog.||) COALESCE(proc.proname OPERATOR(pg_catalog.||) '(' OPERATOR(pg_catalog.||) oidvectortypes(proc.proargtypes) OPERATOR(pg_catalog.||) ')' ,typ.typname, cd.relname, op.oprname,
+ cs.typname OPERATOR(pg_catalog.||) ' AS ' OPERATOR(pg_catalog.||) ct.typname OPERATOR(pg_catalog.||) ') ', opcname, opfname) OPERATOR(pg_catalog.||) ';' AS remove_command
FROM pg_catalog.pg_depend As d INNER JOIN pg_catalog.pg_extension As e
- ON d.refobjid = e.oid INNER JOIN pg_catalog.pg_class As c ON
- c.oid = d.classid
- LEFT JOIN pg_catalog.pg_proc AS proc ON proc.oid = d.objid
- LEFT JOIN pg_catalog.pg_type AS typ ON typ.oid = d.objid
- LEFT JOIN pg_catalog.pg_class As cd ON cd.oid = d.objid
- LEFT JOIN pg_operator As op ON op.oid = d.objid
- LEFT JOIN pg_catalog.pg_cast AS ca ON ca.oid = d.objid
- LEFT JOIN pg_catalog.pg_type AS cs ON ca.castsource = cs.oid
- LEFT JOIN pg_catalog.pg_type AS ct ON ca.casttarget = ct.oid
- LEFT JOIN pg_opclass As oc ON oc.oid = d.objid
- LEFT JOIN pg_opfamily As ofa ON ofa.oid = d.objid
- WHERE d.deptype = 'e' and e.extname = $1 and c.relname = $2 AND (proc.prokind = 'a') = $4;$sql$;
+ ON d.refobjid OPERATOR(pg_catalog.=) e.oid INNER JOIN pg_catalog.pg_class As c ON
+ c.oid OPERATOR(pg_catalog.=) d.classid
+ LEFT JOIN pg_catalog.pg_proc AS proc ON proc.oid OPERATOR(pg_catalog.=) d.objid
+ LEFT JOIN pg_catalog.pg_type AS typ ON typ.oid OPERATOR(pg_catalog.=) d.objid
+ LEFT JOIN pg_catalog.pg_class As cd ON cd.oid OPERATOR(pg_catalog.=) d.objid
+ LEFT JOIN pg_catalog.pg_operator As op ON op.oid OPERATOR(pg_catalog.=) d.objid
+ LEFT JOIN pg_catalog.pg_cast AS ca ON ca.oid OPERATOR(pg_catalog.=) d.objid
+ LEFT JOIN pg_catalog.pg_type AS cs ON ca.castsource OPERATOR(pg_catalog.=) cs.oid
+ LEFT JOIN pg_catalog.pg_type AS ct ON ca.casttarget OPERATOR(pg_catalog.=) ct.oid
+ LEFT JOIN pg_catalog.pg_opclass As oc ON oc.oid OPERATOR(pg_catalog.=) d.objid
+ LEFT JOIN pg_catalog.pg_opfamily As ofa ON ofa.oid OPERATOR(pg_catalog.=) d.objid
+ WHERE d.deptype OPERATOR(pg_catalog.=) 'e' and e.extname OPERATOR(pg_catalog.=) $1 and c.relname OPERATOR(pg_catalog.=) $2 AND (proc.prokind OPERATOR(pg_catalog.=) 'a') OPERATOR(pg_catalog.=) $4;$sql$;
END IF;
FOR var_r IN EXECUTE var_sql_list USING param_extension, var_class, param_type, var_is_aggregate
LOOP
- var_sql := var_sql || var_r.remove_command || ';';
+ var_sql := var_sql OPERATOR(pg_catalog.||) var_r.remove_command OPERATOR(pg_catalog.||) ';';
END LOOP;
- IF var_sql > '' THEN
+ IF var_sql OPERATOR(pg_catalog.>) '' THEN
EXECUTE var_sql;
var_result := true;
END IF;
@@ -81,11 +81,11 @@ END;
$$
LANGUAGE plpgsql VOLATILE;
-CREATE OR REPLACE FUNCTION postgis_extension_drop_if_exists(param_extension text, param_statement text)
+CREATE FUNCTION postgis_extension_drop_if_exists(param_extension text, param_statement text)
RETURNS boolean AS
$$
DECLARE
- var_sql_ext text := 'ALTER EXTENSION ' || pg_catalog.quote_ident(param_extension) || ' ' || pg_catalog.replace(param_statement, 'IF EXISTS', '');
+ var_sql_ext text := 'ALTER EXTENSION ' OPERATOR(pg_catalog.||) pg_catalog.quote_ident(param_extension) OPERATOR(pg_catalog.||) ' ' OPERATOR(pg_catalog.||) pg_catalog.replace(param_statement, 'IF EXISTS', '');
var_result boolean := false;
BEGIN
BEGIN
@@ -101,7 +101,7 @@ END;
$$
LANGUAGE plpgsql VOLATILE;
-CREATE OR REPLACE FUNCTION postgis_extension_AddToSearchPath(a_schema_name varchar)
+CREATE FUNCTION postgis_extension_AddToSearchPath(a_schema_name text)
RETURNS text
AS
$$
@@ -110,17 +110,17 @@ DECLARE
var_cur_search_path text;
BEGIN
SELECT reset_val INTO var_cur_search_path FROM pg_catalog.pg_settings WHERE name = 'search_path';
- IF var_cur_search_path LIKE '%' || pg_catalog.quote_ident(a_schema_name) || '%' THEN
- var_result := a_schema_name || ' already in database search_path';
+ IF var_cur_search_path LIKE '%' OPERATOR(pg_catalog.||) pg_catalog.quote_ident(a_schema_name) OPERATOR(pg_catalog.||) '%' THEN
+ var_result := a_schema_name OPERATOR(pg_catalog.||) ' already in database search_path';
ELSE
- var_cur_search_path := var_cur_search_path || ', '
- || pg_catalog.quote_ident(a_schema_name);
- EXECUTE 'ALTER DATABASE ' || pg_catalog.quote_ident(pg_catalog.current_database())
- || ' SET search_path = ' || var_cur_search_path;
- var_result := a_schema_name || ' has been added to end of database search_path ';
+ var_cur_search_path := var_cur_search_path OPERATOR(pg_catalog.||) ', '
+ OPERATOR(pg_catalog.||) pg_catalog.quote_ident(a_schema_name);
+ EXECUTE 'ALTER DATABASE ' OPERATOR(pg_catalog.||) pg_catalog.quote_ident(pg_catalog.current_database())
+ OPERATOR(pg_catalog.||) ' SET search_path = ' OPERATOR(pg_catalog.||) var_cur_search_path;
+ var_result := a_schema_name OPERATOR(pg_catalog.||) ' has been added to end of database search_path ';
END IF;
- EXECUTE 'SET search_path = ' || var_cur_search_path;
+ EXECUTE 'SET search_path = ' OPERATOR(pg_catalog.||) var_cur_search_path;
RETURN var_result;
END
diff --git a/extensions/postgis_extension_helper_uninstall.sql b/extensions/postgis_extension_helper_uninstall.sql
index b08048fd9..2fb1d1756 100644
--- a/extensions/postgis_extension_helper_uninstall.sql
+++ b/extensions/postgis_extension_helper_uninstall.sql
@@ -15,4 +15,5 @@
-- and should be called at the end of the extension upgrade file
DROP FUNCTION postgis_extension_remove_objects(text, text);
DROP FUNCTION postgis_extension_drop_if_exists(text, text);
-DROP FUNCTION postgis_extension_AddToSearchPath(varchar);
+DROP FUNCTION IF EXISTS postgis_extension_AddToSearchPath(varchar);
+DROP FUNCTION IF EXISTS postgis_extension_AddToSearchPath(text);
commit 05eb430e0b2a9483e1aa850523b2584dcf08baa1
Author: Regina Obe <lr at pcorp.us>
Date: Sun Jul 17 18:22:39 2022 -0400
Generate md5 hash. References #5159 for PostGIS 3.0.6
diff --git a/ci/debbie/postgis_make_dist.sh b/ci/debbie/postgis_make_dist.sh
index 0344b11f0..4e76253cf 100644
--- a/ci/debbie/postgis_make_dist.sh
+++ b/ci/debbie/postgis_make_dist.sh
@@ -31,7 +31,9 @@ export newoutdir="postgis-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${PO
sh make_dist.sh
export package=${newoutdir}.tar.gz
+md5sum ${package} > ${package}.md5
echo "The package name is $package"
cp $package $WEB_DIR
+cp ${package}.md5 $WEB_DIR
bash ci/debbie/postgis_release_docs.sh
commit e7dae9e51b539d3dc3fa80dece35a1512660e36a
Author: Regina Obe <lr at pcorp.us>
Date: Sun Jul 17 18:20:36 2022 -0400
crash on ST_SetPoint with empty geoms. Closes #5151 for PostGIS 3.0.6
diff --git a/NEWS b/NEWS
index 30cf30a3f..8e00d0c0a 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ PostGIS 3.0.6dev
- #5115, Allow dropping topologies with pending constraints (Sandro Santilli)
- #5120, Fix not-null result from ST_EstimatedExtent against
truncated tables with spatial index (Sandro Santilli)
+ - #5151, garden crash ST_SetPoint with empty geometries (Regina Obe)
PostGIS 3.0.5
2022/02/02
diff --git a/postgis/lwgeom_functions_basic.c b/postgis/lwgeom_functions_basic.c
index f76fb3ea5..83ec8aa0b 100644
--- a/postgis/lwgeom_functions_basic.c
+++ b/postgis/lwgeom_functions_basic.c
@@ -2325,6 +2325,10 @@ Datum LWGEOM_setpoint_linestring(PG_FUNCTION_ARGS)
elog(ERROR, "First argument must be a LINESTRING");
PG_RETURN_NULL();
}
+ if ( line->points->npoints < 1 ) {
+ elog(ERROR, "Line has no points");
+ PG_RETURN_NULL();
+ }
if (which < 0)
{
/* Use backward indexing for negative values */
diff --git a/regress/core/tickets.sql b/regress/core/tickets.sql
index ef2ffb8c8..cfc731e05 100644
--- a/regress/core/tickets.sql
+++ b/regress/core/tickets.sql
@@ -1385,3 +1385,6 @@ WITH w AS (
SELECT '#4770.c', ST_AsText(g), s FROM w;
------
+
+-- https://trac.osgeo.org/postgis/ticket/5151
+SELECT '#5151', ST_SetPoint(ST_GeomFromText('LINESTRING EMPTY',4326), 1, ST_GeomFromText('POINT(40 50)',4326)) As result;
diff --git a/regress/core/tickets_expected b/regress/core/tickets_expected
index fe50d4d5f..7c6e6b5d5 100644
--- a/regress/core/tickets_expected
+++ b/regress/core/tickets_expected
@@ -454,3 +454,4 @@ ERROR: LWGEOM_addpoint: Invalid offset
#4770.b|POINT(1 1)|302
#4770.c|POINT(0 0)|300
#4770.c|MULTIPOINT(0 0,1 1)|602
+ERROR: Line has no points
-----------------------------------------------------------------------
Summary of changes:
NEWS | 5 +-
ci/debbie/postgis_make_dist.sh | 2 +
extensions/postgis_extension_helper.sql | 90 +++++++++++------------
extensions/postgis_extension_helper_uninstall.sql | 3 +-
postgis/lwgeom_functions_basic.c | 4 +
regress/core/tickets.sql | 3 +
regress/core/tickets_expected | 1 +
7 files changed, 61 insertions(+), 47 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list