[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-323-gbcca50bd5

git at osgeo.org git at osgeo.org
Tue Nov 8 00:29:51 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, master has been updated
       via  bcca50bd5278ea3181df3f2114b2bfe4f94b64db (commit)
      from  6b71a750fd49b6915ab606465e236c137150184e (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 bcca50bd5278ea3181df3f2114b2bfe4f94b64db
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
    
    References #5285 in master branch (3.4.0dev)

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:
 topology/loader/pgtopo_export |  8 ++++----
 topology/loader/pgtopo_import | 10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list