Ticket #2006 (assigned defect)

Opened 2 years ago

Last modified 1 year ago

Join with postgis table

Reported by: oven38@volja.net Assigned to: mapserver-bugs@refractions.net (accepted)
Priority: high Milestone:
Component: PostGIS Interface Version: 4.10
Severity: normal Keywords:
Cc:

Description (Last modified by warmerdam)

Join with postgis table noz work when FROM and TO items are charater type.

mappostgresql.c line 336 must change to 
        sprintf(sql, "SELECT %s FROM %s WHERE %s = '%s'", columns, join->table,
join->to, joininfo->from_value);

 thanks

Change History

01/16/07 23:37:53 changed by sdlime

  • owner changed from sdlime to mapserver-bugs@refractions.net.
  • cc set to steve.lime@dnr.state.mn.us.
  • component changed from MapServer C Library to PostGIS Interface.
And that will break numeric joins (which might be more common). Need to examine
the type of the 'to' column ideally. Could also try the quotes if not using them
throws an error. I'm changing the component to the PostGIS Interface since I
believe Paul wrote the join stuff and see if they have any ideas.

Steve

01/17/07 00:51:11 changed by refractions

Pretty sure we didn't do the postgresql joining. Putting in the ticks should actually work, postgresql is 
pretty clever about appropriately casting things.

01/17/07 10:35:14 changed by sdlime

  • status changed from new to assigned.
Wonder who did? Anyway, cool, I'll make that change then and test it out.

Steve

07/30/07 15:04:42 changed by warmerdam

  • description changed.

Steve,

Are you still planning to fix this? If you are too busy, feel free to reassign it to me, and I'll take a crack at it.

07/30/07 23:46:21 changed by sdlime

Please take it if you have time. It should be easy enough to test. I don't have Postgres running on my mac but I could test at work if necessary.

Steve