[postgis-tickets] [PostGIS] #4334: Can't upgrade with a view based on ST_AsMVTGeom
PostGIS
trac at osgeo.org
Wed Feb 27 07:37:05 PST 2019
#4334: Can't upgrade with a view based on ST_AsMVTGeom
------------------------------------+---------------------------
Reporter: Algunenano | Owner: strk
Type: defect | Status: new
Priority: high | Milestone: PostGIS 2.4.7
Component: build/upgrade/install | Version: 2.4.x
Resolution: | Keywords:
------------------------------------+---------------------------
Comment (by strk):
This is a known issue with functions that change signature over time.
Whenever a function changes signature in a significant way our upgrade
process _drops_ the old function because CREATE OR REPLACE cannot do
everything (like changing parameter names or types or introducing
optional parameters).
To reduce this problem it is HIGHLY ADVISABLE that we _always_ keep
around a function with the old signature, being just a wrapper to
the old. I've tried to do this whenever possible, but not all devs
have taken this into account, saying that some functions should really
just not be relied upon for views and the such. Enforcing such
behavior is NOT EASY at all, as it would imply having our testsuite
create a view using each and every existing function right before an
upgrade (does actually sound like a plan, if you want to start this).
An alternative "solution" to the problem would be to temporarely
drop views relying on some functions and re-create them afterwards.
This would of course ONLY WORK if the new function has a compatible
signature with the old one (ie: not when dropping parameters).
I hope this was a good starting point for you to fix this
long-standing robustness issue :)
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4334#comment:2>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list