[postgis-users] postgis type define error

Hao Ding hdi12 at it.canterbury.ac.nz
Sun Jul 7 20:26:01 PDT 2002


Hi all,

One problem have troubled me for several days. I installed mapserver 
3.6.1, postgresql 7.2.1, and postgis 0.7.1. when querying a map using 
itasca demo application, I got a error message:

msPOSTGISLayerWhichShapes(): Query error. prep_DB:Error executing 
POSTGIS DECLARE statement (0.6 failed - retried 0.5 and it failed too). 
DECLARE mycursor BINARY CURSOR FOR SELECT 
asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from 
airports WHERE the_geom && setSRID('BOX3D(388013.643812817 
5200395.13465842,500802.348432817 5313156.99196842)'::BOX3D, 
find_srid('','airports','the_geom') )

and in the log file, I found error record:

ERROR:  Unable to identify an operator '&&' for types 'geometry' and 
'geometry'
	You will have to retype this query using an explicit cast
ERROR:  Unable to identify an operator '&&' for types 'geometry' and 'box3d'
	You will have to retype this query using an explicit cast
pq_recvbuf: unexpected EOF on client connection

I guess the problem could be the type 'geometry' and 'box3d' were not 
identified. I then dropped my database and created again.

  createdb gisdb
  createlang plpgsql gisdb
  psql -d gisdb -f .../postgis.sql

I found some warning notes at this point:

psql:/home/cosc/studPG/hdi12/pgsql/share/contrib/postgis.sql:218:
NOTICE:ProcedureCreate: type 'box3d' is not yet defined

psql:/home/cosc/studPG/hdi12/pgsql/share/contrib/postgis.sql:228: 
NOTICE:ProcedureCreate: type 'spheroid' is not yet defined

psql:/home/cosc/studPG/hdi12/pgsql/share/contrib/postgis.sql:252: 
NOTICE:ProcedureCreate: type 'wkb' is not yet defined

psql:/home/cosc/studPG/hdi12/pgsql/share/contrib/postgis.sql:273: 
NOTICE:ProcedureCreate: type 'chip' is not yet defined

psql:/home/cosc/studPG/hdi12/pgsql/share/contrib/postgis.sql:338: 
NOTICE:ProcedureCreate: type 'geometry' is not yet defined

psql:/home/cosc/studPG/hdi12/pgsql/share/contrib/postgis.sql:819:
  ERROR:OperatorDef: function 'postgis_gist_sel(oid, oid, int2, opaque, 
int4)' does not exist

psql:/home/cosc/studPG/hdi12/pgsql/share/contrib/postgis.sql:825: 
NOTICE:current transaction is aborted, queries ignored until end of
transaction block
*ABORT STATE*

psql:/home/cosc/studPG/hdi12/pgsql/share/contrib/postgis.sql:831: 
NOTICE:current transaction is aborted, queries ignored until end of 
transaction block
*ABORT STATE*

psql:/home/cosc/studPG/hdi12/pgsql/share/contrib/postgis.sql:837: 
NOTICE:current transaction is aborted, queries ignored until end of
transaction block
*ABORT STATE*
......

Obviously the type 'geometry', 'box3d', and many other things
were not defined.

Can anyone tell me how to solve the problem? Any suggestions would be 
very appreciated.

Regards!
Hao







More information about the postgis-users mailing list