Opened 13 years ago

Closed 13 years ago

#1094 closed defect (fixed)

Fix broken curved regress tests

Reported by: robe Owned by: strk
Priority: blocker Milestone: PostGIS 2.0.0
Component: postgis Version: master
Keywords: Cc:


As a result of the switch to typmod as default behavior of AddGeometryColumn — most of the curved support regress tests are failing.

Paul can you take care of it. Not sure what types these should be.

For example this:

CREATE TABLE public.circularstring (id INTEGER, description VARCHAR);

SELECT AddGeometryColumn('public', 'circularstring', 'the_geom_2d', -1, 'CIRCULARSTRING', 2);

Now generates a statement:

ALTER TABLE public.circularstring ADD COLUMN the_geom_2d  geometry(CircularString, -1);

Which gives error: ERROR: Invalid geometry type modifier: circularstring

Not sure what it should be

Attachments (1)

g_util-dynamic_geomtype_array.diff (1.1 KB ) - added by strk 13 years ago.
patch against r7570 to drop hard-coded geomtype_struct_array size

Download all attachments as: .zip

Change History (4)

comment:1 by strk, 13 years ago

It looks like the relevant code is in liblwgeom/g_util.c, at the geomtype_struct_array array of geomtype_struct objects.

Odd enough the comment above the array says that order is important in that NO typename should occur within an entry before it but the rule is immediately broken (GEOMETRY appears after GEOMETRYCOLLECTION)

I've also noticed that a static number (44) is used to size the array and to later use it to scan it over. I'm attaching a patch which makes that number computed by compiler so it's easier to add types in there.

by strk, 13 years ago

patch against r7570 to drop hard-coded geomtype_struct_array size

comment:2 by strk, 13 years ago

Owner: changed from pramsey to strk
Status: newassigned

I'm working on a fix for this.

comment:3 by strk, 13 years ago

Resolution: fixed
Status: assignedclosed

This is fixed as of r7576

Note: See TracTickets for help on using tickets.