pgRouting / pgrouting

Repository contains pgRouting library. Development branch is "develop", stable branch is "master"
https://pgrouting.org
GNU General Public License v2.0
1.12k stars 364 forks source link

pgr_trspViaEdges fails in 2.3 and 2.4 column reference "seq" is ambiguous #717

Closed robe2 closed 7 years ago

robe2 commented 7 years ago

Expected behavior and actual behavior

Should return answers and does in my pgrouting 2.2.2 install. In pgRouting 2.3.1 and my pgRouting 2.4.0 dev versions returns this error:

ERROR: column reference "seq" is ambiguous LINE 1: SELECT seq-1 AS seq, node::INTEGER AS id1, edge::INTEGER AS ...

Steps to reproduce the problem

 SELECT r.seq, r.id1 As route_id, 
    r.id2 As node, r.id3 AS edge,
    r.cost
FROM pgr_trspViaEdges(
$$SELECT gid::int4 AS id, 
    source::int4, target::int4, 
    length_m::float8 AS cost 
    FROM ospr.ways$$,
ARRAY(SELECT edge_id::int
        FROM visit_pois
    ORDER BY id),
ARRAY(SELECT fraction
        FROM visit_pois
    ORDER BY id), false, false
) AS r;

Specifications like the version of pgRouting/PostGIS and PostgreSQL as well as Operating System

Not working in versions: 2.3.1, 2.4.0 (develop) works in 2.2.2 (probably later versions of 2.2 as well, but didn't test)

Testing in PostgreSQL 9.5 and 9.6 windows 64-bit

robe2 commented 7 years ago

Latest 2.3 branch seems to have fixed the issue. Now I'll ticket another.

cvvergara commented 7 years ago

@robe2 ok, I will publish changes on the weekend. on a 2.3.2 release thanks for testing