#2648 closed enhancement (fixed)
Missing schema name in ST_GetFaceGeometry function call to topology table
Reported by: | pauldzy | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.1.2 |
Component: | topology | Version: | 2.1.x |
Keywords: | history | Cc: |
Description
Line 1393 in sqlmm.sql
IF NOT EXISTS(SELECT name FROM topology WHERE name = toponame) THEN
Needs table reference changed to topology.topology.
Thanks, Paul
Change History (7)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Hi there,
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.
Cheers, Paul
comment:3 by , 11 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
It should be all qualified, the search_path trick is only a facility for the user
comment:4 by , 11 years ago
Keywords: | history added |
---|---|
Resolution: | → fixed |
Status: | reopened → closed |
comment:5 by , 11 years ago
Paul,
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.
strk,
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 , 11 years ago
Robe, those are all bugs. If anyone files ticket for them I'm up to fix 'hem.
comment:7 by , 11 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.
Cheers, Paul
Paul,
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.