Postgis installation: type "geometry" does not exist Postgis installation: type "geometry" does not exist postgresql postgresql

Postgis installation: type "geometry" does not exist


I had the same problem, but it was fixed by running following code

CREATE EXTENSION postgis;

In detail,

  1. open pgAdmin
  2. select (click) your database
  3. click "SQL" icon on the bar
  4. run "CREATE EXTENSION postgis;" code


If the Postgis-Extension is loaded, then your SQL perhaps does not find the geometry-type because of missing search-path to the public schema.

Try

SET search_path = ..., public;

in the first line of your scsript. (replace ... with the other required search-paths)


You can do it from terminal:

psql mydatabasename -c "CREATE EXTENSION postgis";