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
assign_vertex_id() #16
Comments
I have the same problem. "assign_vertex_id" works if I run it on a table of roads (made from Tiger 2009 shapefiles) that was created in the public schema, but if I create it in any other schema, I get that error he listed, whether I qualify the table name with the schema prefix or not. |
I modified assign_vertex_id to accept an optional schema name. I have a doubt regarding which schema 'vertices_tmp' table should be created in. Check this branch: https://github.com/pgRouting/pgrouting/commits/issue16 |
I don't see a need for this. you can change your search path before you run the command. Or you can write a trivial wrapper the changes the search path then execute the original command. I don't think we want to add schema to all our commands, and I can't see any overriding reason that this should get it and the others should not. |
I agree with Steve as if we add "schema" here we have to add it everywhere. |
This is a little bit problematic from the point of view that we should be passing table name through quote_ident(tablename) which results in:
which is NOT what we want. What we need is "schema"."table". We could write a utility function like |
This utility function sounds like a good idea to me. |
pgr_quote_ident(text) will get pushed in a minute. I used this name instead of camelcase so it mirror the postgresql function. |
Cool. Thanks! |
hi friends my english language is poor.i want to use assign_vertex_id() with SCHEMA name. for example i need use: select assign_vertex_id('baharestan.roads', 0.001, 'the_geom', 'gid'); but it has this error:
NOTICE: CREATE TABLE will create implicit sequence "vertices_tmp_id_seq" for serial column "vertices_tmp.id" CONTEXT: SQL statement "CREATE TABLE vertices_tmp (id serial)" PL/pgSQL function "assign_vertex_id" line 21 at EXECUTE statement ERROR: relation "baharestan.roads" does not exist CONTEXT: SQL statement "SELECT count(*) as countids FROM "baharestan.roads"" PL/pgSQL function "assign_vertex_id" line 28 at FOR over EXECUTE statement
thanks a lot
The text was updated successfully, but these errors were encountered: