I have a sql dump of the schema of an existing database that is working correctly. When I try to load this into a new, empty database
psql new_db < dump.sql, I get the following error:
ERROR: 42704: type "geometry" does not exist LOCATION: LookupTypeNameOid, parse_type.c:228 Time: 51.680 ms
dump.sql file is quoted below down to the failing line:
-- -- PostgreSQL database dump -- -- Dumped from database version 10.1 -- Dumped by pg_dump version 10.1 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET row_security = off; -- -- Name: bridj; Type: SCHEMA; Schema: -; Owner: - -- CREATE SCHEMA bridj; -- -- Name: postgis; Type: SCHEMA; Schema: -; Owner: - -- CREATE SCHEMA postgis; -- -- Name: topology; Type: SCHEMA; Schema: -; Owner: - -- CREATE SCHEMA topology; -- -- Name: SCHEMA topology; Type: COMMENT; Schema: -; Owner: - -- COMMENT ON SCHEMA topology IS 'PostGIS Topology schema'; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: - -- CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; -- -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: - -- COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; -- -- Name: postgis; Type: EXTENSION; Schema: -; Owner: - -- CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA postgis; -- -- Name: EXTENSION postgis; Type: COMMENT; Schema: -; Owner: - -- COMMENT ON EXTENSION postgis IS 'PostGIS geometry, geography, and raster spatial types and functions'; -- -- Name: postgis_topology; Type: EXTENSION; Schema: -; Owner: - -- CREATE EXTENSION IF NOT EXISTS postgis_topology WITH SCHEMA topology;
It appears that the
postgis_topology extension cannot find the
geometry type because it’s in the
postgis schema rather than the
public schema. I have tried running
set show_path to "$ user", public, postgis;
but that has no effect; creating the extension fails with the same error.
- The reason for the schema move is that we are using database schemas to isolate data for multiple tenants. Thus,
publicwill not always be in the search path. By moving PostGIS to its own schema, we can keep that in the search path at all times
- Postgres 10.1
- POSTGIS=”2.4.2 r16113″ PGSQL=”100″ GEOS=”3.6.2-CAPI-1.10.2 4d2925d6″ PROJ=”Rel. 4.9.3, 15 August 2016″ GDAL=”GDAL 2.2.3, released 2017/11/20″ LIBXML=”2.9.7″ LIBJSON=”0.12.1″ LIBPROTOBUF=”1.3.0″ TOPOLOGY RASTER
✓ Extra quality
ExtraProxies brings the best proxy quality for you with our private and reliable proxies
✓ Extra anonymity
Top level of anonymity and 100% safe proxies – this is what you get with every proxy package
✓ Extra speed
1,ooo mb/s proxy servers speed – we are way better than others – just enjoy our proxies!
USA proxy location
We offer premium quality USA private proxies – the most essential proxies you can ever want from USA
Our proxies have TOP level of anonymity + Elite quality, so you are always safe and secure with your proxies
Use your proxies as much as you want – we have no limits for data transfer and bandwidth, unlimited usage!
Superb fast proxy servers with 1,000 mb/s speed – sit back and enjoy your lightning fast private proxies!
99,9% servers uptime
Alive and working proxies all the time – we are taking care of our servers so you can use them without any problems
No usage restrictions
You have freedom to use your proxies with every software, browser or website you want without restrictions
Perfect for SEO
We are 100% friendly with all SEO tasks as well as internet marketing – feel the power with our proxies
Buy more proxies and get better price – we offer various proxy packages with great deals and discounts
We are working 24/7 to bring the best proxy experience for you – we are glad to help and assist you!