Restoring PostgreSQL databases could be sometimes tricky and most likely so include a few errors. In today’s issue resolving series, we are going to deal with the following error:
type: "geography" does not exist.
The error is related to PostGIS, which is basically an PostgreSQL extension that enables support for geographical objects. This usually occurs when dumping a db backup into a new empty database.
One of two scenarios comes to my mind:
- The PostGIS extension is not installed.
- The PostGIS extension is installed but not enabled.
The installation docs could be found in the PostGIS link above, so we are going to focus on the second one.
Step 1. Login to PostgreSQL.
Step 2. Connect to the database.
Step 3. Enable the PostGIS extension.
CREATE EXTENSION Postgis;
If you got any ideas, different approach or solution, let me know in the comments below.
On a side note, follow our official channel on Telegram.