Opened 10 years ago
Closed 10 years ago
#3028 closed defect (fixed)
create extension postgis from unpackaged - ERROR: function st_intersection(raster, integer, geometry) does not exist
Reported by: | strk | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.2.0 |
Component: | raster | Version: | master |
Keywords: | Cc: |
Description
An innocent-looking good installation of current postgis trunk:
POSTGIS="2.2.0dev r13206" GEOS="3.5.0dev-CAPI-1.9.0 r4038" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.11.1, released 2014/09/24" LIBXML="2.9.1" LIBJSON="0.11.99" TOPOLOGY RASTER
Fails to be switched to the corresponding just-installed extension:
=# create extension postgis from unpackaged; ERROR: function st_intersection(raster, integer, geometry) does not exist
For some reason the message doesn't seem new to me, but I could not find an existing ticket (maybe there is one?)
Change History (9)
comment:1 by , 10 years ago
Owner: | changed from | to
---|
comment:4 by , 10 years ago
But indeed I don't have it:
strk=# alter FUNCTION st_intersection (rast raster, band integer, geomin geometry) security invoker; ERROR: function st_intersection(raster, integer, geometry) does not exist
Nor rtpostgis_upgrade.sql installs it for me, which is weird because I do see the line adding it.
FOUND: the rtpostgis_upgrade.sql first drops it (as it changed signature or something) then creates it and finally drops it again as "obsoleted" (which evidently isn't).
It's dropped with lots of other functions on line 8698 of rtpostgis_upgrade.sql for me as the final step. Initially dropped on line 532 and recreated on line 6417
comment:5 by , 10 years ago
Owner: | changed from | to
---|
The culprit is line 62 of rtpostgis_drop.sql.in -- now I wonder how many more should be removed from there. One other question I have is: how come "make check" does not catch this ? It does run an upgrade, supposedly. Is ST_Intersection(raster, integer, geometry) not tested by the regression suite ?
comment:6 by , 10 years ago
robe: maybe the bots could start additionally running run_test with --extension --upgrade-path unpackaged--current (need to check how run_test would deal with similar one)
comment:7 by , 10 years ago
Removing that function from the drop, next error raises: ERROR: function st_intersection(raster, geometry) does not exist
This one is defined in a somewhat conflicting way, once with default argument, one w/out. I guess at runtime you'd get an "ambiguous" message when trying to call the 2-argument version, shouldn't you ?
The complete list of suspicious functions: https://github.com/postgis/postgis/blob/svn-trunk/raster/rt_pg/rtpostgis_drop.sql.in#L53-L62
The two definitions of the next problematic one: https://github.com/postgis/postgis/blob/svn-trunk/raster/rt_pg/rtpostgis.sql.in#L6366 https://github.com/postgis/postgis/blob/svn-trunk/raster/rt_pg/rtpostgis.sql.in#L6406
It needs some love to clean up duplications, obsolete some functions and keep the others
comment:8 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
r13207 fixes the upgrade to avoid dropping the above two functions, both non-obsoleted (maybe one of them should though).
comment:9 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
creating extension from unpackaged now works.
I have no ideas about extensions... punting to robe.