[postgis-tickets] [SCM] PostGIS branch master updated. 3.4.0beta1-72-g45d1967b7

git at osgeo.org git at osgeo.org
Thu Jul 27 08:34:24 PDT 2023


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  45d1967b73a989e748ce4be30a858f7667c9e04c (commit)
      from  a76b581b7ca37a35ae8f170c19231afe6d7154ad (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 45d1967b73a989e748ce4be30a858f7667c9e04c
Author: Sandro Santilli <strk at kbt.io>
Date:   Thu Jul 27 17:34:09 2023 +0200

    Add man page for postgis_restore
    
    Closes #5447

diff --git a/doc/Makefile.in b/doc/Makefile.in
index f0336707e..2e612910c 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -493,7 +493,7 @@ endif
 comments-uninstall:
 	$(MAKE) -f Makefile.comments uninstall
 
-man-install: man/shp2pgsql.1 man/pgsql2shp.1 man/pgtopo_export.1 man/pgtopo_import.1 man/postgis.1
+man-install: man/shp2pgsql.1 man/pgsql2shp.1 man/pgtopo_export.1 man/pgtopo_import.1 man/postgis.1 man/postgis_restore.1
 	mkdir -p $(DESTDIR)$(mandir)/man1
 	for f in $^; do \
 		$(INSTALL_DATA) $$f $(DESTDIR)$(mandir)/man1/`basename $$f`; \
@@ -505,6 +505,7 @@ man-uninstall:
 	rm -f $(DESTDIR)$(mandir)/man1/pgtopo_export.1
 	rm -f $(DESTDIR)$(mandir)/man1/pgtopo_import.1
 	rm -f $(DESTDIR)$(mandir)/man1/postgis.1
+	rm -f $(DESTDIR)$(mandir)/man1/postgis_restore.1
 
 html-install: $(html_builddir)/postgis$(DOCSUFFIX).html
 	mkdir -p $(DESTDIR)$(htmldir)
diff --git a/doc/man/postgis_restore.1 b/doc/man/postgis_restore.1
new file mode 100644
index 000000000..b5d333deb
--- /dev/null
+++ b/doc/man/postgis_restore.1
@@ -0,0 +1,52 @@
+.TH "postgis_restore" "1" "" "" "PostGIS"
+.SH "NAME"
+.LP
+postgis_restore - restore a PostGIS database from an archive file created by pg_dump
+
+.SH "SYNTAX"
+.LP
+postgis_restore [\fI-v\fR] [\fI-L TOC\fR] [\fI-s schema\fR] \fIdumpfile\fR
+
+.SH "DESCRIPTION"
+.LP
+The postgis_restore command allows extracting SQL statements to re-create objects
+found in a custom dump of a PostGIS-enabled database while skipping the PostGIS
+specific objects.
+
+This is only useful for dumps of databases in which PostGIS was enabled by
+loading the postgis.sql script. Dumps taken from databases in which PostGIS was
+enabled via \fICREATE EXTENSION\fR will not have PostGIS objects in them so can
+safely be restored directly using \fIpg_restore\fR.
+
+Note that this command only works with dumps using the custom format, which are
+those crated with \fIpg_dump -Fc\fR.
+
+.SH "USAGE"
+.LP
+Usage information is printed when the script is invoked with no
+arguments.
+
+.SH "EXAMPLES"
+.LP
+
+Create a custom dump from \fIolddb\fR:
+
+	pg_dump -Fc olddb > olddb.dump
+
+Create a new database \fInewdb\fR:
+
+	createdb newdb
+
+PostGIS-enable the new database:
+
+	psql -c 'CREATE EXTENSION postgis' newdb
+
+Restore your data:
+
+	postgis_restore.pl olddb.dump | psql newdb
+
+.SH "AUTHORS"
+.LP
+Originally written by Sandro Santilli <strk at kbt.io>.
+
+More information is available at http://postgis.net

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

Summary of changes:
 doc/Makefile.in           |  3 ++-
 doc/man/postgis_restore.1 | 52 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 1 deletion(-)
 create mode 100644 doc/man/postgis_restore.1


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list