Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed pgr_pointsAsPolygon breaking when comparing strings in WHERE clause #1193

Merged
merged 3 commits into from
Mar 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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