I have setup a postgres database(version 9.1) and trying to create a table capable of storing st_geometry with the following query :
CREATE TABLE sensitive_areas (area_id integer, name varchar(128), zone st_geometry);
But I am getting the error as follows :
ERROR: type "st_geometry" does not exist
Do I need to configure my postgres installation further to enable geometry data type .
The correct type name is geometry
. If you are you are using PostGIS 2.0 you can use a typmod:
-- If you haven't done so already
CREATE EXTENSION postgis;
-- Make a table of Polygons, using long/lat coords
CREATE TABLE sensitive_areas (
area_id integer primary key,
name varchar(128),
zone geometry(Polygon,4326)
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With