Ticket #1094 (closed defect: fixed)

Opened 23 months ago

Last modified 23 months ago

Fix broken curved regress tests

Reported by: robe Owned by: strk
Priority: blocker Milestone: PostGIS 2.0.0
Component: postgis Version: trunk
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

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

Change History

Changed 23 months ago by strk

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.

Changed 23 months ago by strk

patch against r7570 to drop hard-coded geomtype_struct_array size

Changed 23 months ago by strk

  • owner changed from pramsey to strk
  • status changed from new to assigned

I'm working on a fix for this.

Changed 23 months ago by strk

  • status changed from assigned to closed
  • resolution set to fixed

This is fixed as of r7576

Note: See TracTickets for help on using tickets.