Commit 0552977a authored by Regina Obe's avatar Regina Obe

Create rt_legacy.c and postgis_legacy.c put back functions taken out in 2.5...

Create rt_legacy.c and postgis_legacy.c put back functions taken out in 2.5 and put them in these files.  Stub them with errors.
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
parent a8cd46e9
Pipeline #37805863 failed with stage
in 5 minutes and 37 seconds
......@@ -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)
......
/**********************************************************************
*
* 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);
}
......@@ -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 \
......
/**********************************************************************
*
* 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();");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment