Обсуждение: Postgis error
Hi, Using postgreSQL 8.4 and Postgis 1.4 in an Ubuntu 10.04 Server, when trying to create a table: CREATE TABLE observation ( (...) spatial_value geometry, ); I get this error message: ERROR: type "geometry" does not exist I supposed that installing postgis I would get the geographical object, so I am not sure if I have to do anything else. Thanks in advance for your help, Alvaro.
Op 17 jan 2011, om 18:35 heeft Plata Martínez, Álvaro (KNMI) het volgende geschreven: > Hi, > > Using postgreSQL 8.4 and Postgis 1.4 in an Ubuntu 10.04 Server, Did also install the PostGIS-functions, types, etc. in your database? Installing PostGIS is a combination of installing the package and the SQL-parts. Check this article: http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/ > when trying to create a table: > CREATE TABLE observation ( > (...) > spatial_value geometry, > ); > > I get this error message: > ERROR: type "geometry" does not exist > > I supposed that installing postgis I would get the geographical > object, so I am not sure if I have to do anything else. > > Thanks in advance for your help, > Alvaro. > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general Regards, Frank Heikens
=?ISO-8859-1?Q?=22Plata_Mart=EDnez=2C_=C1lvaro_=28KNMI=29=22?= <alvaro.plata.martinez@knmi.nl> writes: > Using postgreSQL 8.4 and Postgis 1.4 in an Ubuntu 10.04 Server, when > trying to create a table: > CREATE TABLE observation ( > (...) > spatial_value geometry, > ); > I get this error message: > ERROR: type "geometry" does not exist It looks like you didn't actually install PostGIS into the database. Just putting the library on your machine isn't enough: you have to run a SQL script to declare all the functions in each database you want to use PostGIS in. regards, tom lane
Hi, for adding a geometry-column to an existing table use one of the postgis-functions "select AddGeometryColumn(...);" described in: http://postgis.refractions.net/documentation/manual-1.5/AddGeometryColumn.html Ludwig Am 17.01.2011 18:35, schrieb "Plata Martínez, Álvaro (KNMI)": > Hi, > > Using postgreSQL 8.4 and Postgis 1.4 in an Ubuntu 10.04 Server, when > trying to create a table: > CREATE TABLE observation ( > (...) > spatial_value geometry, > ); > > I get this error message: > ERROR: type "geometry" does not exist > > I supposed that installing postgis I would get the geographical > object, so I am not sure if I have to do anything else. > > Thanks in advance for your help, > Alvaro.