Opened 9 years ago
Closed 9 years ago
Last modified 9 years ago
#2648 closed enhancement (fixed)
Missing schema name in ST_GetFaceGeometry function call to topology table
|Reported by:||pauldzy||Owned by:||strk|
Line 1393 in sqlmm.sql
IF NOT EXISTS(SELECT name FROM topology WHERE name = toponame) THEN
Needs table reference changed to topology.topology.
Change History (7)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
|Status:||new → closed|
Yes without the schema qualifier, things were failing in ValidateTopology. You are correct that topology is not on any of my user search paths. Is that a manual step we need to do on our own as part of using the topology extension? Okay can do. That should probably be noted somewhere in the docs as the code seems to flip back and forth on whether to qualify references to topology.
Thanks for the fast response.
comment:3 by , 9 years ago
|Status:||closed → reopened|
It should be all qualified, the search_path trick is only a facility for the user
comment:4 by , 9 years ago
|Status:||reopened → closed|
comment:5 by , 9 years ago
The search_path to topology should be automatically added to database search_path when you install topology as part of the install process. The cases I have seen where people have issues is if there user account has its own custom search path which overrides the database search_path.
Aren't there a lot of calls within functions that aren't schema qualified? e.g. AsTopoJSON makes calls to GetTopoGeomElements without schema qualification. topogeo_addPoint makes calls to ST_ChangeEdgeGeom without schema qualification. topogeo_addpolygon makes calls to ST_GetFaceGeometry without schema qualification.
I can go on and on. But you get the point that topology doesn't currently work unless you have topology in your search_path.
comment:6 by , 9 years ago
Robe, those are all bugs. If anyone files ticket for them I'm up to fix 'hem.
comment:7 by , 9 years ago
|Type:||defect → enhancement|
Thanks for all the help,
I am not sure why topology was not added to my search path. It was even odder as I added the tiger extension and tiger was added!
I found this link useful on resolving the matter as there is not a lot out there in terms of help http://www.postgresonline.com/journal/archives/279-Schema-and-search_path-surprises.html
It might be useful to consider having a function that serves to validate the environment and perhaps gives back feedback on what might be faulty and needs correction.
Are you having a problem with that. I don't think any of the logic in topology is schema qualified anymore. It should work unless you have another topology table in another schema or topology is not in your search_path. Topology not being in your search_path would cause all sorts of other problems.