[postgis-users] create spatial table problem
Kralidis,Tom [Burlington]
Tom.Kralidis at ec.gc.ca
Tue Feb 21 09:10:20 PST 2006
Hi,
I'm trying to create a spatial table with:
create table hydromet_stations (
id serial primary key,
stnid text,
portfurl text,
graphurl text,
sensormlurl text,
organization text
);
select AddGeometryColumn('hydromet_stations','the_geom',4326,'POINT',2);
create index hydromet_stations_idx ON hydromet_stations USING GIST (
the_geom GIST_GEOMETRY_OPS );
create index hydromet_stations_idx_oid ON hydromet_stations ( oid );
...which gives me an error:
devgeodb2=# \i create_table2.sql
psql:create_table2.sql:9: NOTICE: CREATE TABLE will create implicit
sequence "hydromet_stations_id_seq" for seri
al column "hydromet_stations.id"
psql:create_table2.sql:9: NOTICE: CREATE TABLE / PRIMARY KEY will
create implicit index "hydromet_stations_pkey"
for table "hydromet_stations"
CREATE TABLE
addgeometrycolumn
------------------------------------------------------------------------
----------------
public.hydromet_stations.the_geom SRID:4326 TYPE:POINT DIMS:2
geometry_column fixed:0
(1 row)
CREATE INDEX
psql:create_table2.sql:14: ERROR: column "oid" does not exist
devgeodb2=# delete from geometry_columns where f_table_name =
'hydromet_stations';
DELETE 1
devgeodb2=# drop table hydromet_stations ;
devgeodb2=# select postgis_version();
postgis_version
---------------------------------------
1.1 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
(1 row)
Any advice would be much appreciated.
Thanks
..Tom
More information about the postgis-users
mailing list