Skip to Content
PostGIS Cookbook - Second Edition
book

PostGIS Cookbook - Second Edition

by Stephen Vincent Mather, Pedro Wightman, Bborie Park, Thomas Kraft, Mayra Zurbarán, Paolo Corti
March 2018
Beginner to intermediate content levelBeginner to intermediate
584 pages
14h 31m
English
Packt Publishing
Content preview from PostGIS Cookbook - Second Edition

How to do it...

On the command line, perform the following steps:

  1. Even though a backup file was created in this chapter's third recipe, create a new backup file by executing the following command:
      > pg_dump -U me -f chapter10.backup -F custom chapter10
  1. Create a new database to which the backup file will be restored by executing the following commands:
      > psql -d postgres -U me
      postgres=# CREATE DATABASE new10;
  1. Connect to the new10, database and create a postgis schema as follows:
      postgres=# \c new10
      new10=# CREATE SCHEMA postgis;
  1. Execute the CREATE EXTENSION command to install the Postgis extension in the postgis schema:
      new10=# CREATE EXTENSION postgis WITH SCHEMA postgis;
  1. Make sure you set the search_path parameter to include ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PostgreSQL 13 Cookbook

PostgreSQL 13 Cookbook

Vallarapu Naga Avinash Kumar
PostgreSQL High Performance Cookbook

PostgreSQL High Performance Cookbook

Dinesh Kumar, Chitij Chauhan
Mastering PostGIS

Mastering PostGIS

Dominik Mikiewicz, Michal Mackiewicz, Tomasz Nycz

Publisher Resources

ISBN: 9781788299329Supplemental Content