Ticket #2006 (closed defect: fixed)

Opened 6 years ago

Last modified 4 years ago

Join with postgis table

Reported by: oven38@… Owned by: pramsey
Priority: high Milestone:
Component: PostGIS Interface Version: 4.10
Severity: normal Keywords:
Cc:

Description (last modified by warmerdam) (diff)

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

Changed 6 years ago by sdlime

  • cc steve.lime@… added
  • owner changed from sdlime to mapserver-bugs@…
  • 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

Changed 6 years ago 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.

Changed 6 years ago by sdlime

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

Steve

Changed 6 years ago by warmerdam

  • description modified (diff)

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.

Changed 6 years ago 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

Changed 5 years ago by pramsey

  • owner changed from mapserver-bugs@… to pramsey
  • status changed from assigned to new

Changed 4 years ago by pramsey

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

Fixed in 5.4 branch at r9049 and in trunk at r9050.

Note: See TracTickets for help on using tickets.