[postgis-users] About Invalid OGC WKT Error

strk at refractions.net strk at refractions.net
Fri Feb 4 00:37:04 PST 2005


On Fri, Feb 04, 2005 at 09:52:02AM +0900, Koji Yano wrote:
> strk at refractions.net wrote:
> > Is the lwpostgis.sql you loaded the one which came from
> > RC1 or RC2 ?
> > 
> 
> Sorry to be late to reply.
> Your addices are just what I needed.
> I created new database ,loaded lwpostgis.sql from RC2 and tested that.
> Then I can insert data by the same SQL successfully.
> 
> Now I have a feeling that I made a mistake during upgrading.
> Maybe in uploading dumpfiles when I upgraded PostgreSQL 8.0.0 to 8.0.1.
> Thank you for your help.

Basically *fromwkb and *fromtext functions changed signature
between RC1 and RC2, so you need to drop and recreate them 
for a clean upgrade. 

--strk;

> 
> 
> > Can you post the output of this queries ?
> >
> > # SELECT proname, proargtypes from pg_proc where proname like
> > '%fromtext' or proname like '%fromwkb';
> > # SELECT oid, typname from pg_type where typname = 'geometry'
> >  or typname = 'bytea' or typname = 'text';
> >
> > --strk;
> 
> Here is what I get.
> 
> # SELECT proname, proargtypes FROM pg_proc WHERE proname like
> '%fromtext' or proname like '%fromwkb';
>          proname         | proargtypes
> -------------------------+-------------
>  geomcollfromtext        |    38597 23
>  geomcollfromtext        |       38597
>  geomcollfromwkb         |    38597 23
>  geomcollfromwkb         |       38597
>  geometryfromtext        |       38597
>  geometryfromtext        |    38597 23
>  geomfromtext            |       38597
>  geomfromtext            |    38597 23
>  geomfromwkb             |          17
>  geomfromwkb             |       17 23
>  linefromtext            |       38597
>  linefromtext            |    38597 23
>  linefromwkb             |    38597 23
>  linefromwkb             |       38597
>  linestringfromtext      |       38597
>  linestringfromtext      |    38597 23
>  linestringfromwkb       |    38597 23
>  linestringfromwkb       |       38597
>  mlinefromtext           |    38597 23
>  mlinefromtext           |       38597
>  mlinefromwkb            |    38597 23
>  mlinefromwkb            |       38597
>  mpointfromtext          |    38597 23
>  mpointfromtext          |       38597
>  mpointfromwkb           |    38597 23
>  mpointfromwkb           |       38597
>  mpolyfromtext           |    38597 23
>  mpolyfromtext           |       38597
>  mpolyfromwkb            |    38597 23
>  mpolyfromwkb            |       38597
>  multilinefromwkb        |    38597 23
>  multilinefromwkb        |       38597
>  multilinestringfromtext |       38597
>  multilinestringfromtext |    38597 23
>  multipointfromtext      |    38597 23
>  multipointfromtext      |       38597
>  multipointfromwkb       |    38597 23
>  multipointfromwkb       |       38597
>  multipolyfromwkb        |    38597 23
>  multipolyfromwkb        |       38597
>  multipolygonfromtext    |    38597 23
>  multipolygonfromtext    |       38597
>  pointfromtext           |       38597
>  pointfromtext           |    38597 23
>  pointfromwkb            |    38597 23
>  pointfromwkb            |       38597
>  polyfromtext            |       38597
>  polyfromtext            |    38597 23
>  polyfromwkb             |    38597 23
>  polyfromwkb             |       38597
>  polygonfromtext         |    38597 23
>  polygonfromtext         |       38597
>  polygonfromwkb          |    38597 23
>  polygonfromwkb          |       38597
> (54 rows)
> 
> # SELECT oid, typname FROM pg_type WHERE typname = 'geometry' or
> typname='bytea' or typname='text';
>   oid  | typname
> -------+----------
>     17 | bytea
>     25 | text
>  38597 | geometry
> (3 rows)
> 
> And here is the output of same queries from new created database.
> I think this is the proper result.
> 
> gistest2=# SELECT proname, proargtypes FROM pg_proc WHERE proname like
> '%fromtext' or proname like '%fromwkb';
>          proname         | proargtypes
> -------------------------+-------------
>  geometryfromtext        |          25
>  geometryfromtext        |       25 23
>  geomfromtext            |          25
>  geomfromtext            |       25 23
>  pointfromtext           |          25
>  pointfromtext           |       25 23
>  linefromtext            |          25
>  linefromtext            |       25 23
>  linestringfromtext      |          25
>  linestringfromtext      |       25 23
>  polyfromtext            |          25
>  polyfromtext            |       25 23
>  polygonfromtext         |       25 23
>  polygonfromtext         |          25
>  mlinefromtext           |       25 23
>  mlinefromtext           |          25
>  multilinestringfromtext |          25
>  multilinestringfromtext |       25 23
>  mpointfromtext          |       25 23
>  mpointfromtext          |          25
>  multipointfromtext      |       25 23
>  multipointfromtext      |          25
>  mpolyfromtext           |       25 23
>  mpolyfromtext           |          25
>  multipolygonfromtext    |       25 23
>  multipolygonfromtext    |          25
>  geomcollfromtext        |       25 23
>  geomcollfromtext        |          25
>  geomfromwkb             |          17
>  geomfromwkb             |       17 23
>  pointfromwkb            |       17 23
>  pointfromwkb            |          17
>  linefromwkb             |       17 23
>  linefromwkb             |          17
>  linestringfromwkb       |       17 23
>  linestringfromwkb       |          17
>  polyfromwkb             |       17 23
>  polyfromwkb             |          17
>  polygonfromwkb          |       17 23
>  polygonfromwkb          |          17
>  mpointfromwkb           |       17 23
>  mpointfromwkb           |          17
>  multipointfromwkb       |       17 23
>  multipointfromwkb       |          17
>  multilinefromwkb        |       17 23
>  multilinefromwkb        |          17
>  mlinefromwkb            |       17 23
>  mlinefromwkb            |          17
>  mpolyfromwkb            |       17 23
>  mpolyfromwkb            |          17
>  multipolyfromwkb        |       17 23
>  multipolyfromwkb        |          17
>  geomcollfromwkb         |       17 23
>  geomcollfromwkb         |          17
> (54 rows)
> 
> gistest2=# SELECT oid, typname FROM pg_type WHERE typname = 'geometry'
> or typname='bytea' or typname='text';
>   oid  | typname
> -------+----------
>     17 | bytea
>     25 | text
>  59166 | geometry
> (3 rows)
> 
> Thank you for your nice advice!
> 
> Koji Yano
> http://www.officeyano.net
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list