[prev in list] [next in list] [prev in thread] [next in thread]
List: postgis-users
Subject: Re: [postgis-users] create spatial table problem
From: alex bodnaru <alexbodn () 012 ! net ! il>
Date: 2006-02-22 1:59:37
Message-ID: 43FBC589.1090109 () alex3
[Download RAW message or body]
hi,
the oid column is optional in newer postgresql.
please read the postgresql documentation on this.
alex
Kralidis,Tom [Burlington] wrote:
> 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
> _______________________________________________
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic