Database Reference
In-Depth Information
postgres=# \c new10
new10=# CREATE SCHEMA postgis;
4. If your PostgreSQL server supports CREATE EXTENSION , execute the fol-
lowing command:
new10=# CREATE EXTENSION postgis WITH
SCHEMA postgis;
Otherwise, run the following commands:
new10=# SET search_path = postgis;
new10=# \i /PATHTOFILE/postgis.sql
new10=# \i /PATHTOFILE/rtpost
gis.sql
new10=# \i /PATHTOFILE/spatial_ref_sys.sql
5. Make sure you set the search_path parameter to include the postgis
schema, as follows:
new10=# ALTER DATABASE new10 SET
search_path = public, postgis;
6. Restore only the public schema from the backup file to the new10 data-
base by executing the following command:
> pg_restore -d new10 --schema=public
chapter10.backup
7. The restore method runs, but throws error messages such as the follow-
ing:
pg_restore: [archiver (db)] Error while
PROCESSING TOC:
pg_restore: [archiver (db)] Error from
TOC entry 3781; 0 3496229 TABLE DATA
prism postgres
pg_restore: [archiver (db)] COPY failed
Search WWH ::




Custom Search