PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches
postgis_legacy.c
Go to the documentation of this file.
1/**********************************************************************
2 *
3 * PostGIS - Spatial Types for PostgreSQL
4 * http://postgis.net
5 *
6 * PostGIS is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * PostGIS is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with PostGIS. If not, see <http://www.gnu.org/licenses/>.
18 *
19 **********************************************************************
20 *
21 * Copyright (C) 2018 Regina Obe <lr@pcorp.us>
22 *
23 **********************************************************************/
24/******************************************************************************
25 * This file is to hold functions we no longer use,
26 * but we need to keep because they were used at one time behind SQL API functions.
27 * This is to ease pg_upgrade upgrades
28 *
29 * All functions in this file should throw an error telling the user to upgrade
30 * the install
31 *
32 *****************************************************************************/
33
34#include "postgres.h"
35#include "utils/builtins.h"
36#include "../postgis_config.h"
37#include "lwgeom_pg.h"
38
39#define POSTGIS_DEPRECATE(version, funcname) \
40 Datum funcname(PG_FUNCTION_ARGS); \
41 PG_FUNCTION_INFO_V1(funcname); \
42 Datum funcname(PG_FUNCTION_ARGS) \
43 { \
44 ereport(ERROR, (\
45 errcode(ERRCODE_FEATURE_NOT_SUPPORTED), \
46 errmsg("A stored procedure tried to use deprecated C function '%s'", \
47 __func__), \
48 errdetail("Library function '%s' was deprecated in PostGIS %s", \
49 __func__, version), \
50 errhint("Consider running: SELECT postgis_extensions_upgrade()") \
51 )); \
52 PG_RETURN_POINTER(NULL); \
53 }
54
55POSTGIS_DEPRECATE("2.2.0", LWGEOMFromWKB);
56POSTGIS_DEPRECATE("2.5.0", pgis_abs_in);
57POSTGIS_DEPRECATE("2.5.0", pgis_abs_out);
58POSTGIS_DEPRECATE("3.0.0", area);
62POSTGIS_DEPRECATE("3.0.0", geomunion);
64POSTGIS_DEPRECATE("3.0.0", intersection);
66POSTGIS_DEPRECATE("3.0.0", difference);
70POSTGIS_DEPRECATE("3.0.0", intersects3d);
71POSTGIS_DEPRECATE("3.0.0", intersects3d_dwithin);
72POSTGIS_DEPRECATE("3.0.0", sfcgal_intersects3d);
73POSTGIS_DEPRECATE("3.0.0", distance3d);
74POSTGIS_DEPRECATE("3.0.0", sfcgal_distance3d);
76POSTGIS_DEPRECATE("3.0.0", intersects);
77POSTGIS_DEPRECATE("3.0.0", pgis_geometry_accum_finalfn);
78POSTGIS_DEPRECATE("3.0.0", postgis_autocache_bbox);
79POSTGIS_DEPRECATE("2.0.0", postgis_uses_stats);
Datum LWGEOM_mindistance3d(PG_FUNCTION_ARGS)
static double distance(double x1, double y1, double x2, double y2)
Definition lwtree.c:1032
Datum geos_geomunion(PG_FUNCTION_ARGS)
Datum geos_intersects(PG_FUNCTION_ARGS)
Datum geos_difference(PG_FUNCTION_ARGS)
Datum geos_intersection(PG_FUNCTION_ARGS)
Datum LWGEOM_mindistance2d(PG_FUNCTION_ARGS)
Datum LWGEOM_area_polygon(PG_FUNCTION_ARGS)
Datum sfcgal_intersects(PG_FUNCTION_ARGS)
#define POSTGIS_DEPRECATE(version, funcname)