Reputation: 35
I am trying to create a table in sql fiddle (Postgres 9.3) using the following command to create geometry coordinate.
create table geoCordinate(Coordinate geometry,Place varchar(30), name int);
And trying to insert following values:
INSERT INTO geoCordinate VALUES
( ST_GeomFromEWKT('SRID=312;POINT(37.457797 -122.161298)'), '1', 1 ),
( ST_GeomFromEWKT('SRID=312;POINT(37.423629 -122.174416)'), '1', 2 ),
( ST_GeomFromEWKT('SRID=312;POINT(37.45774 -122.118724)'), '1', 3 ),
( ST_GeomFromEWKT('SRID=312;POINT(37.442434 -122.115522)'), '1', 4 ),
( ST_GeomFromEWKT('SRID=312;POINT(37.44862 -122.136768)'), '1', 5);
But I am getting the following error :
ERROR: type "geometry" does not exist
Upvotes: 0
Views: 300
Reputation: 43622
SQL Fiddle does not support the PostGIS extension, i.e. normally installed with:
CREATE EXTENSION postgis;
however, this raises:
ERROR: could not open extension control file "/usr/share/postgresql/9.3/extension/postgis.control": No such file or directory
Beyond this, there are several issues with your geometries... (no typmods, invalid SRID, reversed axis order)
Upvotes: 1