[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0rc1-213-g74a85a0
git at osgeo.org
git at osgeo.org
Wed Jun 16 08:55:03 PDT 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 74a85a0ab32080dbf59996b7863cbff5e7e61aea (commit)
from e3acf2aa509ec446f1df02ef06567e3194ae7edf (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 74a85a0ab32080dbf59996b7863cbff5e7e61aea
Author: Sandro Santilli <strk at kbt.io>
Date: Wed Jun 16 17:54:11 2021 +0200
Fix missing user errors from GetRingEdges
References #4929 in main branch (3.2.0dev)
diff --git a/topology/postgis_topology.c b/topology/postgis_topology.c
index 3acc5c6..be74d9a 100644
--- a/topology/postgis_topology.c
+++ b/topology/postgis_topology.c
@@ -1203,6 +1203,12 @@ cb_getRingEdges(const LWT_BE_TOPOLOGY *topo, LWT_ELEMID edge, uint64_t *numelems
*numelems = SPI_processed;
if ( ! SPI_processed )
{
+ cberror(
+ topo->be_data,
+ "No edge with id %" LWTFMT_ELEMID" in Topology \"%s\"",
+ ABS(edge),
+ topo->name
+ );
return NULL;
}
if (limit && *numelems == (uint64_t)limit)
@@ -5056,8 +5062,8 @@ Datum GetRingEdges(PG_FUNCTION_ARGS)
pfree(toponame);
if ( ! topo )
{
- /* should never reach this point, as lwerror would raise an exception */
SPI_finish();
+ lwpgerror("%s", cb_lastErrorMessage(&be_data));
PG_RETURN_NULL();
}
@@ -5068,8 +5074,8 @@ Datum GetRingEdges(PG_FUNCTION_ARGS)
if ( ! elems )
{
- /* should never reach this point, as lwerror would raise an exception */
SPI_finish();
+ lwpgerror("%s", cb_lastErrorMessage(&be_data));
PG_RETURN_NULL();
}
diff --git a/topology/test/regress/getringedges.sql b/topology/test/regress/getringedges.sql
index 88b4bd4..6d23626 100644
--- a/topology/test/regress/getringedges.sql
+++ b/topology/test/regress/getringedges.sql
@@ -2,6 +2,11 @@ set client_min_messages to ERROR;
\i ../load_topology.sql
+-- Test bogus calls
+SELECT 'non-existent-topo', topology.GetRingEdges('non-existent', 1);
+SELECT 'non-existent-edge', topology.GetRingEdges('city_data', 10000000);
+SELECT 'non-existent-edge-negative', topology.GetRingEdges('city_data', -10000000);
+
SELECT 'R'||edge_id, (topology.GetRingEdges('city_data', edge_id)).*
FROM city_data.edge;
diff --git a/topology/test/regress/getringedges_expected b/topology/test/regress/getringedges_expected
index 904609d..0b6a470 100644
--- a/topology/test/regress/getringedges_expected
+++ b/topology/test/regress/getringedges_expected
@@ -1,235 +1,66 @@
-t
-9
-22
-26
-R1|1|1
-R2|1|2
-R2|2|3
-R2|3|-3
-R3|1|3
-R3|2|-3
-R3|3|2
-R4|1|4
-R4|2|-5
-R4|3|5
-R4|4|-4
-R5|1|5
-R5|2|-4
-R5|3|4
-R5|4|-5
-R6|1|6
-R6|2|7
-R6|3|8
-R6|4|-15
-R6|5|-16
-R6|6|-14
-R6|7|-13
-R6|8|-12
-R6|9|22
-R6|10|21
-R7|1|7
-R7|2|8
-R7|3|-15
-R7|4|-16
-R7|5|-14
-R7|6|-13
-R7|7|-12
-R7|8|22
-R7|9|21
-R7|10|6
-R8|1|8
-R8|2|-15
-R8|3|-16
-R8|4|-14
-R8|5|-13
-R8|6|-12
-R8|7|22
-R8|8|21
-R8|9|6
-R8|10|7
-R9|1|9
-R9|2|19
-R9|3|-6
-R9|4|-21
-R10|1|10
-R10|2|-20
-R10|3|13
-R10|4|18
-R11|1|11
-R11|2|15
-R11|3|-8
-R11|4|-17
-R12|1|12
-R12|2|20
-R12|3|-9
-R12|4|-22
-R13|1|13
-R13|2|18
-R13|3|10
-R13|4|-20
-R14|1|14
-R14|2|16
-R14|3|-11
-R14|4|-18
-R15|1|15
-R15|2|-8
-R15|3|-17
-R15|4|11
-R16|1|16
-R16|2|-11
-R16|3|-18
-R16|4|14
-R17|1|17
-R17|2|-7
-R17|3|-19
-R17|4|-10
-R18|1|18
-R18|2|10
-R18|3|-20
-R18|4|13
-R19|1|19
-R19|2|-6
-R19|3|-21
-R19|4|9
-R20|1|20
-R20|2|-9
-R20|3|-22
-R20|4|12
-R21|1|21
-R21|2|6
-R21|3|7
-R21|4|8
-R21|5|-15
-R21|6|-16
-R21|7|-14
-R21|8|-13
-R21|9|-12
-R21|10|22
-R22|1|22
-R22|2|21
-R22|3|6
-R22|4|7
-R22|5|8
-R22|6|-15
-R22|7|-16
-R22|8|-14
-R22|9|-13
-R22|10|-12
-R25|1|25
-R25|2|-25
-R26|1|26
-R-1|1|-1
-R-2|1|-2
-R-3|1|-3
-R-3|2|2
-R-3|3|3
-R-4|1|-4
-R-4|2|4
-R-4|3|-5
-R-4|4|5
-R-5|1|-5
-R-5|2|5
-R-5|3|-4
-R-5|4|4
-R-6|1|-6
-R-6|2|-21
-R-6|3|9
-R-6|4|19
-R-7|1|-7
-R-7|2|-19
-R-7|3|-10
-R-7|4|17
-R-8|1|-8
-R-8|2|-17
-R-8|3|11
-R-8|4|15
-R-9|1|-9
-R-9|2|-22
-R-9|3|12
-R-9|4|20
-R-10|1|-10
-R-10|2|17
-R-10|3|-7
-R-10|4|-19
-R-11|1|-11
-R-11|2|-18
-R-11|3|14
-R-11|4|16
-R-12|1|-12
-R-12|2|22
-R-12|3|21
-R-12|4|6
-R-12|5|7
-R-12|6|8
-R-12|7|-15
-R-12|8|-16
-R-12|9|-14
-R-12|10|-13
-R-13|1|-13
-R-13|2|-12
-R-13|3|22
-R-13|4|21
-R-13|5|6
-R-13|6|7
-R-13|7|8
-R-13|8|-15
-R-13|9|-16
-R-13|10|-14
-R-14|1|-14
-R-14|2|-13
-R-14|3|-12
-R-14|4|22
-R-14|5|21
-R-14|6|6
-R-14|7|7
-R-14|8|8
-R-14|9|-15
-R-14|10|-16
-R-15|1|-15
-R-15|2|-16
-R-15|3|-14
-R-15|4|-13
-R-15|5|-12
-R-15|6|22
-R-15|7|21
-R-15|8|6
-R-15|9|7
-R-15|10|8
-R-16|1|-16
-R-16|2|-14
-R-16|3|-13
-R-16|4|-12
-R-16|5|22
-R-16|6|21
-R-16|7|6
-R-16|8|7
-R-16|9|8
-R-16|10|-15
-R-17|1|-17
-R-17|2|11
-R-17|3|15
-R-17|4|-8
-R-18|1|-18
-R-18|2|14
-R-18|3|16
-R-18|4|-11
-R-19|1|-19
-R-19|2|-10
-R-19|3|17
-R-19|4|-7
-R-20|1|-20
-R-20|2|13
-R-20|3|18
-R-20|4|10
-R-21|1|-21
-R-21|2|9
-R-21|3|19
-R-21|4|-6
-R-22|1|-22
-R-22|2|12
-R-22|3|20
-R-22|4|-9
-R-25|1|-25
-R-25|2|25
-R-26|1|-26
-Topology 'city_data' dropped
+ERROR: schema "topology" does not exist at character 8
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
+ERROR: schema "topology" does not exist at character 29
+ERROR: schema "topology" does not exist at character 29
+ERROR: schema "topology" does not exist at character 38
+ERROR: relation "city_data.edge" does not exist at character 76
+ERROR: relation "city_data.edge" does not exist at character 78
+ERROR: schema "topology" does not exist at character 8
-----------------------------------------------------------------------
Summary of changes:
topology/postgis_topology.c | 10 +-
topology/test/regress/getringedges.sql | 5 +
topology/test/regress/getringedges_expected | 301 ++++++----------------------
3 files changed, 79 insertions(+), 237 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list