[postgis-devel] Force to Update SQL Function

Regina Obe lr at pcorp.us
Tue Aug 8 20:27:32 PDT 2023


When we change a function like adding a new argument, we drop the old
version of the function before we create the new.

Those drops are put in this file:

https://git.osgeo.org/gitea/postgis/postgis/src/branch/master/postgis/postgi
s_before_upgrade.sql

the final postgis extension upgrade scripts includes that
postgis_before_upgrade.sql script

as you see on this line:

https://git.osgeo.org/gitea/postgis/postgis/src/branch/master/extensions/pos
tgis/Makefile.in#L119
 

Hope that helps,
Regina

> -----Original Message-----
> From: postgis-devel [mailto:postgis-devel-bounces at lists.osgeo.org] On
> Behalf Of Bo Zhou
> Sent: Tuesday, August 8, 2023 8:55 PM
> To: postgis-devel at lists.osgeo.org
> Subject: [postgis-devel] Force to Update SQL Function
> 
> Hi !
> 
> I would like to ask a question on SQL function update during typical
> development.
> 
> When we're working on the SQL functions in src/postgis.sql.in, sometimes
> the function has to be changed, for example, append a new argument to the
> function.
> 
> But when new binary was installed, extension was installed again, the
> database still remembers the old function, not the new one. So that the
> question is, is there any way to force to update the functions except
deleting
> extension and re-create it ?
> 
> I tried the function PostGIS_Extensions_Upgrade(), not work, restart
> database server, not work, only drop the extensions by force and
re-install
> extension, but the all database tables will drop geometry-typed column
too,
> which is really annoying.
> 
> Thanks a lot for any advice !
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel



More information about the postgis-devel mailing list