Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: type "public.geometry" does not exist

I'm supposed to create a spatial database and have installed Postgres and added the PostGIS extension.

When I try to add a column of type public.geometry it always gives an error message that

geometry type doesn't exist

I'm not familiar with Postgres, and I don't know what the solution can possibly be. I tried to Google it but found nothing.

like image 345
Jihane Hemicha Avatar asked Nov 21 '16 02:11

Jihane Hemicha


1 Answers

Did you CREATE EXTENSION postgis; ? Check \dx in psql.

Did you put the PostGIS extension in some other schema? Check \dT *.geometry in psql.

like image 95
Craig Ringer Avatar answered Sep 24 '22 23:09

Craig Ringer