diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2021-12-13 18:08:28 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2021-12-13 18:08:28 -0500 |
commit | 189699dd3680d85c74c3886b33d9a9f83301defd (patch) | |
tree | d9028efdb2860e9c2c1502a7841b878f93a4a036 /src/backend/utils/adt/geo_ops.c | |
parent | 922b23c13be075595c2abc67736b214cb90f84d9 (diff) | |
download | postgresql-189699dd3680d85c74c3886b33d9a9f83301defd.tar.gz postgresql-189699dd3680d85c74c3886b33d9a9f83301defd.zip |
Remove unimplemented/undocumented geometric functions & operators.
Nobody has filled in these stubs for upwards of twenty years,
so it's time to drop the idea that they might get implemented
any day now. The associated pg_operator and pg_proc entries
are just confusing wastes of space.
Per complaint from Anton Voloshin.
Discussion: https://postgr.es/m/3426566.1638832718@sss.pgh.pa.us
Diffstat (limited to 'src/backend/utils/adt/geo_ops.c')
-rw-r--r-- | src/backend/utils/adt/geo_ops.c | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c index e9c347cb8c6..92dc9483b96 100644 --- a/src/backend/utils/adt/geo_ops.c +++ b/src/backend/utils/adt/geo_ops.c @@ -2532,44 +2532,6 @@ dist_bs(PG_FUNCTION_ARGS) PG_RETURN_FLOAT8(box_closept_lseg(NULL, box, lseg)); } -/* - * Distance from a line to a box - */ -Datum -dist_lb(PG_FUNCTION_ARGS) -{ -#ifdef NOT_USED - LINE *line = PG_GETARG_LINE_P(0); - BOX *box = PG_GETARG_BOX_P(1); -#endif - - /* need to think about this one for a while */ - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("function \"dist_lb\" not implemented"))); - - PG_RETURN_NULL(); -} - -/* - * Distance from a box to a line - */ -Datum -dist_bl(PG_FUNCTION_ARGS) -{ -#ifdef NOT_USED - BOX *box = PG_GETARG_BOX_P(0); - LINE *line = PG_GETARG_LINE_P(1); -#endif - - /* need to think about this one for a while */ - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("function \"dist_bl\" not implemented"))); - - PG_RETURN_NULL(); -} - static float8 dist_cpoly_internal(CIRCLE *circle, POLYGON *poly) { @@ -2947,48 +2909,6 @@ close_pb(PG_FUNCTION_ARGS) PG_RETURN_POINT_P(result); } - -/* close_sl() - * Closest point on line to line segment. - * - * XXX THIS CODE IS WRONG - * The code is actually calculating the point on the line segment - * which is backwards from the routine naming convention. - * Copied code to new routine close_ls() but haven't fixed this one yet. - * - thomas 1998-01-31 - */ -Datum -close_sl(PG_FUNCTION_ARGS) -{ -#ifdef NOT_USED - LSEG *lseg = PG_GETARG_LSEG_P(0); - LINE *line = PG_GETARG_LINE_P(1); - Point *result; - float8 d1, - d2; - - result = (Point *) palloc(sizeof(Point)); - - if (lseg_interpt_line(result, lseg, line)) - PG_RETURN_POINT_P(result); - - d1 = line_closept_point(NULL, line, &lseg->p[0]); - d2 = line_closept_point(NULL, line, &lseg->p[1]); - if (float8_lt(d1, d2)) - *result = lseg->p[0]; - else - *result = lseg->p[1]; - - PG_RETURN_POINT_P(result); -#endif - - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("function \"close_sl\" not implemented"))); - - PG_RETURN_NULL(); -} - /* * Closest point on line segment to line. * @@ -3120,22 +3040,6 @@ close_sb(PG_FUNCTION_ARGS) } -Datum -close_lb(PG_FUNCTION_ARGS) -{ -#ifdef NOT_USED - LINE *line = PG_GETARG_LINE_P(0); - BOX *box = PG_GETARG_BOX_P(1); -#endif - - /* think about this one for a while */ - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("function \"close_lb\" not implemented"))); - - PG_RETURN_NULL(); -} - /*--------------------------------------------------------------------- * on_ * Whether one object lies completely within another. @@ -4504,20 +4408,6 @@ path_div_pt(PG_FUNCTION_ARGS) Datum -path_center(PG_FUNCTION_ARGS) -{ -#ifdef NOT_USED - PATH *path = PG_GETARG_PATH_P(0); -#endif - - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("function \"path_center\" not implemented"))); - - PG_RETURN_NULL(); -} - -Datum path_poly(PG_FUNCTION_ARGS) { PATH *path = PG_GETARG_PATH_P(0); |