MapServer / MapServer-import

3 stars 2 forks source link

Join with postgis table #2006

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: oven38@volja.net Date: 2007/01/14 - 02:47

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
tbonfort commented 12 years ago

Author: sdlime Date: 2007/01/17 - 05:37

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
tbonfort commented 12 years ago

Author: refractions Date: 2007/01/17 - 06:51

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

Author: sdlime Date: 2007/01/17 - 16:35

Wonder who did? Anyway, cool, I'll make that change then and test it out.

Steve
tbonfort commented 12 years ago

Author: warmerdam Date: 2007/07/30 - 21:04 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.

tbonfort commented 12 years ago

Author: sdlime Date: 2007/07/31 - 05:46 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

tbonfort commented 12 years ago

Author: pramsey Date: 2009/05/28 - 19:58 Fixed in 5.4 branch at 5c38269c4c3fae3549bf0388692b1c2bd4bf760b (r9049) and in trunk at db3234d8bae60d1b24cc5dc43c91347d5286cb23 (r9050).