aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/geo_selfuncs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/adt/geo_selfuncs.c')
-rw-r--r--src/backend/utils/adt/geo_selfuncs.c142
1 files changed, 73 insertions, 69 deletions
diff --git a/src/backend/utils/adt/geo_selfuncs.c b/src/backend/utils/adt/geo_selfuncs.c
index f0f7bc48d5f..240639d6eda 100644
--- a/src/backend/utils/adt/geo_selfuncs.c
+++ b/src/backend/utils/adt/geo_selfuncs.c
@@ -1,16 +1,16 @@
/*-------------------------------------------------------------------------
*
* geo-selfuncs.c--
- * Selectivity routines registered in the operator catalog in the
- * "oprrest" and "oprjoin" attributes.
+ * Selectivity routines registered in the operator catalog in the
+ * "oprrest" and "oprjoin" attributes.
*
* Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_selfuncs.c,v 1.3 1997/08/19 21:34:40 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_selfuncs.c,v 1.4 1997/09/07 04:50:20 momjian Exp $
*
- * XXX These are totally bogus.
+ * XXX These are totally bogus.
*
*-------------------------------------------------------------------------
*/
@@ -22,112 +22,116 @@
#include "utils/builtins.h"
float64
-areasel(Oid opid,
- Oid relid,
- AttrNumber attno,
- char *value,
- int32 flag)
+areasel(Oid opid,
+ Oid relid,
+ AttrNumber attno,
+ char *value,
+ int32 flag)
{
- float64 result;
-
- result = (float64) palloc(sizeof(float64data));
- *result = 1.0 / 4.0;
- return(result);
+ float64 result;
+
+ result = (float64) palloc(sizeof(float64data));
+ *result = 1.0 / 4.0;
+ return (result);
}
float64
areajoinsel(Oid opid,
- Oid relid,
- AttrNumber attno,
- char *value,
- int32 flag)
+ Oid relid,
+ AttrNumber attno,
+ char *value,
+ int32 flag)
{
- float64 result;
-
- result = (float64) palloc(sizeof(float64data));
- *result = 1.0 / 4.0;
- return(result);
+ float64 result;
+
+ result = (float64) palloc(sizeof(float64data));
+ *result = 1.0 / 4.0;
+ return (result);
}
/*
- * Selectivity functions for rtrees. These are bogus -- unless we know
- * the actual key distribution in the index, we can't make a good prediction
- * of the selectivity of these operators.
+ * Selectivity functions for rtrees. These are bogus -- unless we know
+ * the actual key distribution in the index, we can't make a good prediction
+ * of the selectivity of these operators.
*
- * In general, rtrees need to search multiple subtrees in order to guarantee
- * that all occurrences of the same key have been found. Because of this,
- * the heuristic selectivity functions we return are higher than they would
- * otherwise be.
+ * In general, rtrees need to search multiple subtrees in order to guarantee
+ * that all occurrences of the same key have been found. Because of this,
+ * the heuristic selectivity functions we return are higher than they would
+ * otherwise be.
*/
/*
- * left_sel -- How likely is a box to be strictly left of (right of, above,
- * below) a given box?
+ * left_sel -- How likely is a box to be strictly left of (right of, above,
+ * below) a given box?
*/
#ifdef NOT_USED
float64
leftsel(Oid opid,
- Oid relid,
- AttrNumber attno,
- char *value,
- int32 flag)
+ Oid relid,
+ AttrNumber attno,
+ char *value,
+ int32 flag)
{
- float64 result;
-
- result = (float64) palloc(sizeof(float64data));
- *result = 1.0 / 6.0;
- return(result);
+ float64 result;
+
+ result = (float64) palloc(sizeof(float64data));
+ *result = 1.0 / 6.0;
+ return (result);
}
+
#endif
#ifdef NOT_USED
float64
leftjoinsel(Oid opid,
- Oid relid,
- AttrNumber attno,
- char *value,
- int32 flag)
+ Oid relid,
+ AttrNumber attno,
+ char *value,
+ int32 flag)
{
- float64 result;
-
- result = (float64) palloc(sizeof(float64data));
- *result = 1.0 / 6.0;
- return(result);
+ float64 result;
+
+ result = (float64) palloc(sizeof(float64data));
+ *result = 1.0 / 6.0;
+ return (result);
}
+
#endif
/*
- * contsel -- How likely is a box to contain (be contained by) a given box?
+ * contsel -- How likely is a box to contain (be contained by) a given box?
*/
#ifdef NOT_USED
float64
contsel(Oid opid,
- Oid relid,
- AttrNumber attno,
- char *value,
- int32 flag)
+ Oid relid,
+ AttrNumber attno,
+ char *value,
+ int32 flag)
{
- float64 result;
-
- result = (float64) palloc(sizeof(float64data));
- *result = 1.0 / 10.0;
- return(result);
+ float64 result;
+
+ result = (float64) palloc(sizeof(float64data));
+ *result = 1.0 / 10.0;
+ return (result);
}
+
#endif
#ifdef NOT_USED
float64
contjoinsel(Oid opid,
- Oid relid,
- AttrNumber attno,
- char *value,
- int32 flag)
+ Oid relid,
+ AttrNumber attno,
+ char *value,
+ int32 flag)
{
- float64 result;
-
- result = (float64) palloc(sizeof(float64data));
- *result = 1.0 / 10.0;
- return(result);
+ float64 result;
+
+ result = (float64) palloc(sizeof(float64data));
+ *result = 1.0 / 10.0;
+ return (result);
}
+
#endif