Re: "interesting" issue with restore from a pg_dump with adatabase-wide search_path - Mailing list pgsql-hackers

From Joshua D. Drake
Subject Re: "interesting" issue with restore from a pg_dump with adatabase-wide search_path
Date
Msg-id e5c5f765-3e56-4743-9213-f1741a4b1482@commandprompt.com
Whole thread Raw
In response to "interesting" issue with restore from a pg_dump with a database-widesearch_path  (Larry Rosenman <ler@lerctr.org>)
Responses Re: "interesting" issue with restore from a pg_dump with adatabase-wide search_path  (Larry Rosenman <ler@lerctr.org>)
List pgsql-hackers
On 07/06/2018 11:27 AM, Larry Rosenman wrote:
> when I pg_dump -Fc the database and then try to restore it after a
> create database, I get errors.  To get a clean restare I need to do:

Knowing the errors would be helpful.

jD


> ---
> \set DB `echo ${DB}`
> CREATE SCHEMA IF NOT EXISTS postgis;
> CREATE SCHEMA IF NOT EXISTS topology;
> CREATE SCHEMA IF NOT EXISTS tiger;
> SET search_path=public,postgis,tiger,topology;
> ALTER DATABASE :DB SET search_path=public,postgis,tiger,topology;
> \c
> CREATE EXTENSION fuzzystrmatch schema postgis;
> -- Enable PostGIS (includes raster)
> CREATE EXTENSION postgis schema postgis;
> -- Enable Topology
> CREATE EXTENSION postgis_topology schema topology;
> -- Enable PostGIS Advanced 3D
> -- and other geoprocessing algorithms
> CREATE EXTENSION postgis_sfcgal schema postgis;
> -- rule based standardizer
> CREATE EXTENSION address_standardizer schema postgis;
> -- example rule data set
> CREATE EXTENSION address_standardizer_data_us schema postgis;
> -- Enable US Tiger Geocoder
> CREATE EXTENSION postgis_tiger_geocoder schema tiger;
> -- routing functionality
> CREATE EXTENSION pgrouting schema postgis;
> -- spatial foreign data wrappers
> CREATE EXTENSION ogr_fdw schema postgis;
> -- LIDAR support
> CREATE EXTENSION pointcloud schema postgis;
> -- LIDAR Point cloud patches to geometry type cases
> CREATE EXTENSION pointcloud_postgis schema postgis;
> ----
> Is the need to do this expected?
>
> This is 10.4 on FreeBSD.
>
>
>

-- 
Command Prompt, Inc. || http://the.postgres.company/ || @cmdpromptinc
***  A fault and talent of mine is to tell it exactly how it is.  ***
PostgreSQL centered full stack support, consulting and development.
Advocate: @amplifypostgres || Learn: https://postgresconf.org
*****     Unless otherwise stated, opinions are my own.   *****



pgsql-hackers by date:

Previous
From: Larry Rosenman
Date:
Subject: "interesting" issue with restore from a pg_dump with a database-widesearch_path
Next
From: Andres Freund
Date:
Subject: Re: pgbench issue