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: |
Description
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)
Change History (4)
comment:1 by , 13 years ago
by , 13 years ago
Attachment: | g_util-dynamic_geomtype_array.diff added |
---|
patch against r7570 to drop hard-coded geomtype_struct_array size
comment:2 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
I'm working on a fix for this.
Note:
See TracTickets
for help on using tickets.
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.