PostGIS  3.7.0dev-r@@SVN_REVISION@@
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-2020 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 
38 #define POSTGIS_DEPRECATE(version, funcname) \
39  Datum funcname(PG_FUNCTION_ARGS); \
40  PG_FUNCTION_INFO_V1(funcname); \
41  Datum funcname(PG_FUNCTION_ARGS) \
42  { \
43  ereport(ERROR, (\
44  errcode(ERRCODE_FEATURE_NOT_SUPPORTED), \
45  errmsg("A stored procedure tried to use deprecated C function '%s'", \
46  __func__), \
47  errdetail("Library function '%s' was deprecated in PostGIS %s", \
48  __func__, version), \
49  errhint("Consider running: SELECT postgis_extensions_upgrade()") \
50  )); \
51  PG_RETURN_POINTER(NULL); \
52  }
53 
54 POSTGIS_DEPRECATE("2.2.0", LWGEOMFromWKB)
55 POSTGIS_DEPRECATE("2.5.0", pgis_abs_in)
56 POSTGIS_DEPRECATE("2.5.0", pgis_abs_out)
57 POSTGIS_DEPRECATE("3.0.0", area)
61 POSTGIS_DEPRECATE("3.0.0", geomunion)
63 POSTGIS_DEPRECATE("3.0.0", intersection)
65 POSTGIS_DEPRECATE("3.0.0", difference)
68 POSTGIS_DEPRECATE("3.0.0", sfcgal_intersects)
69 POSTGIS_DEPRECATE("3.0.0", intersects3d)
70 POSTGIS_DEPRECATE("3.0.0", intersects3d_dwithin)
71 POSTGIS_DEPRECATE("3.0.0", sfcgal_intersects3d)
72 POSTGIS_DEPRECATE("3.0.0", distance3d)
73 POSTGIS_DEPRECATE("3.0.0", sfcgal_distance3d)
75 POSTGIS_DEPRECATE("3.0.0", intersects)
76 POSTGIS_DEPRECATE("3.0.0", pgis_geometry_accum_finalfn)
77 POSTGIS_DEPRECATE("3.0.0", postgis_autocache_bbox)
78 POSTGIS_DEPRECATE("2.0.0", postgis_uses_stats)
79 
80 
82 POSTGIS_DEPRECATE("3.1.0", sfcgal_from_ewkt)
83 POSTGIS_DEPRECATE("3.1.0", sfcgal_area3D)
84 POSTGIS_DEPRECATE("3.1.0", sfcgal_intersection3D)
85 POSTGIS_DEPRECATE("3.1.0", sfcgal_difference3D)
86 POSTGIS_DEPRECATE("3.1.0", sfcgal_union3D)
87 POSTGIS_DEPRECATE("3.1.0", sfcgal_volume)
88 POSTGIS_DEPRECATE("3.1.0", sfcgal_extrude)
89 POSTGIS_DEPRECATE("3.1.0", sfcgal_straight_skeleton)
90 POSTGIS_DEPRECATE("3.1.0", sfcgal_approximate_medial_axis)
91 POSTGIS_DEPRECATE("3.1.0", sfcgal_is_planar)
92 POSTGIS_DEPRECATE("3.1.0", sfcgal_orientation)
93 POSTGIS_DEPRECATE("3.1.0", sfcgal_force_lhr)
94 POSTGIS_DEPRECATE("3.1.0", ST_ConstrainedDelaunayTriangles)
95 POSTGIS_DEPRECATE("3.1.0", sfcgal_tesselate)
96 POSTGIS_DEPRECATE("3.1.0", sfcgal_minkowski_sum)
97 POSTGIS_DEPRECATE("3.1.0", sfcgal_make_solid)
98 POSTGIS_DEPRECATE("3.1.0", sfcgal_is_solid)
99 POSTGIS_DEPRECATE("3.1.0", postgis_sfcgal_noop)
102 POSTGIS_DEPRECATE("3.1.0", LWGEOM_locate_between_m)
104 POSTGIS_DEPRECATE("3.3.0", pgis_geometry_union_finalfn)
105 
106 
107 POSTGIS_DEPRECATE("3.5.0", check_authorization)
108 POSTGIS_DEPRECATE("3.5.0", getTransactionID)
Datum postgis_svn_version(PG_FUNCTION_ARGS)
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)
#define POSTGIS_DEPRECATE(version, funcname)