0

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

1 Answer 1

1

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)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.