[postgis-devel] postgis_extensions_upgrade() change to use ANY--<current> upgrade script file

Sandro Santilli strk at kbt.io
Sun Feb 6 12:29:35 PST 2022


I've pushed a commit which changes postgis_extensions_upgrade() to
not require a specific upgrade file matching the currently installed
extension version.

The trick is updating the postgis record in pg_extension to pretend
it was versioned 'ANY' and thus having PostgreSQL load the
ANY--<target_version> script.

While this will not work out of the box to upgrade to 3.3.0 (because
the version of postgis_extensions_upgrade() would be old) it will work
for any upgrades from 3.3.0 onward.

People upgrading from older versions can still use the loader/postgis
script which would basically do the same thing and is available since
postgis-3.1 (but I'm afraid we never documented this script)

--strk; 

  Libre GIS consultant/developer
  https://strk.kbt.io/services.html


More information about the postgis-devel mailing list