#5493 closed enhancement (fixed)
No tools are given to resolve presence of deprecated functions
Reported by: | strk | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 3.4.1 |
Component: | build | Version: | 3.4.x |
Keywords: | Cc: |
Description
Presence of deprecated functions is reported by postgis_full_version()
but no tools are given to resolve that situation.
An HINT about how to resolve the situation is given when those deprecated functions are created, that is on the very upgrade being performed, and the HINT suggests to re-define the views and "upgrade again", but upgrading again currently does not even try to drop those deprecated functions and thus also fails to report any problem with doing so with associated HINT about it.
I suggest we make the upgrade script always try to delete all deprecated functions rather than only those created by the upgrade script itself (which is what is happening now)
Change History (8)
comment:1 by , 15 months ago
Summary: | Non tools are given to resolve presence of deprecated functions → No tools are given to resolve presence of deprecated functions |
---|
comment:2 by , 15 months ago
Sorry for the partial comment, I meant upgrading BEFORE manually dropping the deprecated functions currently errors out with something like:
ERROR: Attempting to rename replaced function st_dwithin(geometry, geometry, float8) got function st_dwithin_deprecated_by_postgis_200(geometry, geometry, double precision) already exists in schema "public" (42723)
Maybe the upgrader could catch that exception and hint the user about the need to resolve the situation, after trying to resolve it itself.
comment:3 by , 15 months ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
I tried to confirm what I said in previous commit but right now I'm looking at a case in which continuously running an upgrade continuously warns me about functions being left behind, which is perfectly fine for the warning part. This is to say I'm not getting any error, and I guess the error I was seeing was fully due to the bug reported in #5494
The upgrade procedure is PERFECT in that it's enough to follow the HINT (drop views and upgrade again) to actually see those deprecated functions being removed.
All working as expected.
comment:4 by , 15 months ago
I confirm the error with "target function already exists" is due to the deprecated function still being in the database, and the only reason why a deprecated function is still in the database is because we are re-adding it, which is what is happening while being affected by issue #5494:
ERROR: Attempting to rename replaced function st_dwithin(text, text, float8) got function st_dwithin_deprecated_by_postgis_300(text, text, double precision) already exists in schema "public" (42723)
comment:5 by , 15 months ago
It would be nice if CI could catch this problem (currently does not): #5497
I would add that upgrading again BEFORE manually dropping those functions currently errors out by finding the