Browse Source

vlib/pg: fix typo in sql statement (getting 0D topological elements in random order)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@58248 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 11 years ago
parent
commit
46fd0a8fa4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/vector/Vlib/read_pg.c

+ 1 - 1
lib/vector/Vlib/read_pg.c

@@ -1366,7 +1366,7 @@ int Vect__select_line_pg(struct Format_info_pg *pg_info, int fid, int type)
         if (type & GV_POINTS) {
             sprintf(stmt,
                     "SELECT tt.geom,tt.containing_face,ft.fid FROM \"%s\".node AS tt "
-                    "LEFT JOIN \"%s\" AS ft ON (%s).type = 1 and (%s).id = edge_id "
+                    "LEFT JOIN \"%s\" AS ft ON (%s).type = 1 and (%s).id = node_id "
                     "WHERE node_id = %d",
                     pg_info->toposchema_name, pg_info->table_name, pg_info->topogeom_column,
                     pg_info->topogeom_column, fid);