diff --git a/ferramentas/navegapostgis/index.js b/ferramentas/navegapostgis/index.js index 34ad2ce..0791ba5 100755 --- a/ferramentas/navegapostgis/index.js +++ b/ferramentas/navegapostgis/index.js @@ -313,6 +313,9 @@ i3GEOF.navegapostgis = { } else{ ins = ""; + mostra = ""; + ins += ""; + for(i=0;i"; if(retorno[i].type == "line" || retorno[i].type == "polygon" || retorno[i].type == "point" || retorno[i].type == "geometry"){ @@ -359,7 +362,15 @@ i3GEOF.navegapostgis = { if(the_geom != ""){ colunas.push(the_geom); } - sql = the_geom+" from (select "+colunas.join(",")+" from "+i3GEOF.navegapostgis.esquema+"."+i3GEOF.navegapostgis.tabela+") as foo using unique "+gid+" using srid=4326"; + if(colunas[0] === "*"){ + colunas = ["*"]; + } + if(colunas.length === 1){ + i = colunas[0]; + }else{ + i = colunas.join(","); + } + sql = the_geom+" from (select "+i+" from "+i3GEOF.navegapostgis.esquema+"."+i3GEOF.navegapostgis.tabela+") as foo using unique "+gid+" using srid=4326"; sql = sql.replace(",,",","); $i("i3GEOFnavegapostgisSql").value = sql; } -- libgit2 0.21.2
"+gid+""+the_geom+""+mostra+""+nome+"
"+mostra+"Todas