]> granicus.if.org Git - postgis/commitdiff
Create rt_legacy.c and postgis_legacy.c put back functions taken out in 2.5 and put...
authorRegina Obe <lr@pcorp.us>
Sun, 25 Nov 2018 04:35:17 +0000 (04:35 +0000)
committerRegina Obe <lr@pcorp.us>
Sun, 25 Nov 2018 04:35:17 +0000 (04:35 +0000)
Still need to check 2.1 - 2.4 for things we might have taken out (only test pg_upgrade from 9.4 2.4 to 11 3.0 which failed with 3.0 needs dump restore)
References #4193 for PostGIS 3.0 (trunk)

git-svn-id: http://svn.osgeo.org/postgis/trunk@17072 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/Makefile.in
postgis/postgis_legacy.c [new file with mode: 0644]
raster/rt_pg/Makefile.in
raster/rt_pg/rtpg_legacy.c [new file with mode: 0644]

index 5d86682ef2174f5b86465584cc3153e3127ef747..3e04cf6a648088ab9fbf93a5c1346e947d86f22d 100644 (file)
@@ -122,7 +122,8 @@ PG_OBJS= \
        mvt.o \
        lwgeom_out_mvt.o \
        geobuf.o \
-       lwgeom_out_geobuf.o
+       lwgeom_out_geobuf.o \
+       postgis_legacy.o
 
 # Objects to build using PGXS
 OBJS=$(PG_OBJS)
diff --git a/postgis/postgis_legacy.c b/postgis/postgis_legacy.c
new file mode 100644 (file)
index 0000000..3457c91
--- /dev/null
@@ -0,0 +1,62 @@
+/**********************************************************************
+ *
+ * PostGIS - Spatial Types for PostgreSQL
+ * http://postgis.net
+ *
+ * PostGIS is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * PostGIS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with PostGIS.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ **********************************************************************
+ *
+ * Copyright (C) 2018 Regina Obe <lr@pcorp.us>
+ *
+ **********************************************************************/
+/******************************************************************************
+ * This file is to hold functions we no longer use,
+ * but we need to keep because they were used at one time behind SQL API functions.
+ * This is to ease pg_upgrade upgrades
+ *
+ * All functions in this file should throw an error telling the user to upgrade
+ * the install
+ *
+ *****************************************************************************/
+
+#include "postgres.h"
+#include "utils/builtins.h"
+#include "../postgis_config.h"
+#include "lwgeom_pg.h"
+
+/** pgis_abs_in: Removed PostGIS 2.5.0 **/
+Datum pgis_abs_in(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(pgis_abs_in);
+
+Datum
+pgis_abs_in(PG_FUNCTION_ARGS)
+{
+       ereport(ERROR,(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                      errmsg("function %s is out of date. Run: ALTER EXTENSION postgis UPDATE;", __func__)));
+       PG_RETURN_POINTER(NULL);
+}
+
+/** pgis_abs_out: Removed PostGIS 2.5.0 **/
+Datum pgis_abs_out(PG_FUNCTION_ARGS);
+
+PG_FUNCTION_INFO_V1(pgis_abs_out);
+Datum
+pgis_abs_out(PG_FUNCTION_ARGS)
+{
+       ereport(ERROR,(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                      errmsg("function %s is out of date. Run: ALTER EXTENSION postgis UPDATE;", __func__)));
+       PG_RETURN_POINTER(NULL);
+}
+
index 91b0ec9a51a45df704ab9449aca9358de52e7c6c..81113654f83f5c02a4ba217c9825f11de5354551 100644 (file)
@@ -45,6 +45,7 @@ sql_objs: $(DATA_built)
 OBJS = \
        rtpostgis.o \
        rtpg_internal.o \
+       rtpg_legacy.o \
        rtpg_spatial_relationship.o \
        rtpg_mapalgebra.o \
        rtpg_utility.o \
diff --git a/raster/rt_pg/rtpg_legacy.c b/raster/rt_pg/rtpg_legacy.c
new file mode 100644 (file)
index 0000000..a742ad3
--- /dev/null
@@ -0,0 +1,55 @@
+/**********************************************************************
+ *
+ * PostGIS - Spatial Types for PostgreSQL
+ * http://postgis.net
+ *
+ * PostGIS is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * PostGIS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with PostGIS.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ **********************************************************************
+ *
+ * Copyright (C) 2018 Regina Obe <lr@pcorp.us>
+ *
+ **********************************************************************/
+
+/******************************************************************************
+ * This file is to hold functions we no longer use,
+ * but we need to keep because they were used at one time behind SQL API functions.
+ * This is to ease pg_upgrade upgrades
+ *
+ * All functions in this file should throw an error telling the user to upgrade
+ * the install
+ *
+ *****************************************************************************/
+
+#include <postgres.h>
+#include <fmgr.h>
+
+#include "rtpostgis.h"
+
+/** obsolete as of 2.5.0 stubbing for smoother upgrade from 2.4 **/
+Datum RASTER_to_binary(PG_FUNCTION_ARGS);
+
+/**
+ *
+ * Removed in PostGIS 2.5.0
+ */
+PG_FUNCTION_INFO_V1(RASTER_to_binary);
+Datum RASTER_to_binary(PG_FUNCTION_ARGS)
+{
+
+       elog(ERROR, "RASTER_to_binary: This function is out of date. Run: ALTER EXTENSION postgis UPDATE; SELECT PostGIS_Extensions_Upgrade();");
+
+}
+
+