Skip to content

Commit

Permalink
Merge pull request #1193 from iboates/master
Browse files Browse the repository at this point in the history
fixed pgr_pointsAsPolygon breaking when comparing strings in WHERE clause
  • Loading branch information
cvvergara authored Mar 29, 2019
2 parents 2489391 + 011e4a2 commit 72c1e3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pgtap/common/hasnt_v2_signatures.sql
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ SELECT hasnt_function('pgr_ksp',ARRAY['text', 'integer', 'integer', 'integer', '
SELECT hasnt_function('pgr_drivingdistance',ARRAY['text', 'integer', 'double precision', 'boolean', 'boolean']);
SELECT hasnt_function('pgr_bdastar',ARRAY['text', 'integer', 'integer', 'boolean', 'boolean']);
SELECT hasnt_function('pgr_bddijkstra',ARRAY['text', 'integer', 'integer', 'boolean', 'boolean']);
SELECT hasnt_function('pgr_tsp',ARRAY['(double precision[]', 'integer', 'integer']);
SELECT hasnt_function('pgr_tsp',ARRAY['double precision[]', 'integer', 'integer']);

-- deprecated functions
SELECT hasnt_function('pgr_kdijkstracost');
Expand Down
2 changes: 1 addition & 1 deletion sql/alpha_shape/alpha_shape.sql
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ CREATE OR REPLACE FUNCTION pgr_pointsAsPolygon(query varchar, alpha float8 DEFAU
geoms := array[]::geometry[];
i := 1;

FOR vertex_result IN EXECUTE 'SELECT x, y FROM pgr_alphashape('''|| query || ''', ' || alpha || ')'
FOR vertex_result IN EXECUTE 'SELECT x, y FROM pgr_alphashape('''|| REPLACE(query, E'\'', E'\'\'') || ''', ' || alpha || ')'
LOOP
x[i] = vertex_result.x;
y[i] = vertex_result.y;
Expand Down

0 comments on commit 72c1e3d

Please sign in to comment.