[postgis-tickets] [SCM] PostGIS branch stable-3.3 updated. 3.3.1-31-gf5479352f

git at osgeo.org git at osgeo.org
Tue Nov 8 00:31:16 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.3 has been updated
       via  f5479352f19dcab4a6f4bc1c0ec706bcb5997f79 (commit)
      from  754ece28bb948a47c56a6738e8d9f674e31e9c52 (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 f5479352f19dcab4a6f4bc1c0ec706bcb5997f79
Author: Sandro Santilli <strk at kbt.io>
Date:   Tue Nov 8 09:24:14 2022 +0100

    Allow import/export of topologies with names needing quoting
    
    Closes #5285 in stable-3.3 branch (3.3.2dev)

diff --git a/NEWS b/NEWS
index a182b2b03..33c41336f 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,7 @@ PostGIS 3.3.2
   - #5280, Handle load of dbase character fields with no width specified (Regina Obe)
   - #5264, Fix topology install on Alpine (Louis Descoteaux)
   - #5244, postgis_tiger_geocoder update for TIGER 2022 (Regina Obe)
+  - #5285, Fix import/export of topologies with names needing quotes (Sandro Santilli)
 
 
 PostGIS 3.3.1
diff --git a/topology/loader/pgtopo_export b/topology/loader/pgtopo_export
index 76e8976ba..f89c90fa5 100755
--- a/topology/loader/pgtopo_export
+++ b/topology/loader/pgtopo_export
@@ -138,7 +138,7 @@ COPY ( SELECT
   node_id,
   geom,
   containing_face
-FROM ${TOPONAME}.node ) TO STDOUT;
+FROM "${TOPONAME}".node ) TO STDOUT;
 EOF
 
 # Edges
@@ -156,7 +156,7 @@ COPY ( SELECT
   left_face,
   right_face,
   geom
-FROM ${TOPONAME}.edge_data ) TO STDOUT;
+FROM "${TOPONAME}".edge_data ) TO STDOUT;
 EOF
 
 # Faces
@@ -165,13 +165,13 @@ echo "Exporting face..." >&4
 COPY ( SELECT
   face_id,
   mbr
-FROM ${TOPONAME}.face WHERE face_id != 0 ) TO STDOUT;
+FROM "${TOPONAME}".face WHERE face_id != 0 ) TO STDOUT;
 EOF
 
 # Relation
 echo "Exporting relation..." >&4
   cat <<EOF | psql --set ON_ERROR_STOP=1 -XtA > ${DUMPDIR}/relation || exit 1
-COPY ( SELECT * FROM ${TOPONAME}.relation ) TO STDOUT;
+COPY ( SELECT * FROM "${TOPONAME}".relation ) TO STDOUT;
 EOF
 
 if test "$SKIP_LAYERS" = "no"; then # {
diff --git a/topology/loader/pgtopo_import b/topology/loader/pgtopo_import
index 9803d4656..beceaeed6 100755
--- a/topology/loader/pgtopo_import
+++ b/topology/loader/pgtopo_import
@@ -156,21 +156,21 @@ EOF
   #################################################
   cat <<EOF
     SELECT pg_catalog.setval(
-      '${TOPONAME}.node_node_id_seq',
+      '"${TOPONAME}".node_node_id_seq',
       max(node_id),
       true
     )
     FROM "${TOPONAME}".node;
 
     SELECT pg_catalog.setval(
-      '${TOPONAME}.edge_data_edge_id_seq',
+      '"${TOPONAME}".edge_data_edge_id_seq',
       max(edge_id),
       true
     )
     FROM "${TOPONAME}".edge_data;
 
     SELECT pg_catalog.setval(
-      '${TOPONAME}.face_face_id_seq',
+      '"${TOPONAME}".face_face_id_seq',
       NULLIF(max(face_id), 0),
       true
     )
@@ -242,7 +242,7 @@ BEGIN
   -- Create and initialize layer's topogeometry sequence
   CREATE SEQUENCE "${TOPONAME}".topogeo_s_${id};
   PERFORM pg_catalog.setval(
-    '${TOPONAME}.topogeo_s_${id}',
+    '"${TOPONAME}".topogeo_s_${id}',
     max(id("${column}")),
     true
   )
@@ -282,7 +282,7 @@ EOF
   #################################################
   cat <<EOF
   SELECT pg_catalog.setval(
-    '${TOPONAME}.layer_id_seq',
+    '"${TOPONAME}".layer_id_seq',
     max(l.layer_id),
     true
   )

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

Summary of changes:
 NEWS                          |  1 +
 topology/loader/pgtopo_export |  8 ++++----
 topology/loader/pgtopo_import | 10 +++++-----
 3 files changed, 10 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list