summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/geo_selfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-06-05 07:29:25 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-06-05 07:29:25 +0000
commit48165ec2262b73c5b81a6caabab66d883d013a83 (patch)
tree08e878a2a1e7f76981406ac2b34729a510aecac6 /src/backend/utils/adt/geo_selfuncs.c
parentc61db5ba2decf2e620f6ce3699d4b702957ed72a (diff)
downloadpostgresql-48165ec2262b73c5b81a6caabab66d883d013a83.tar.gz
Latest round of fmgr updates. All functions with bool,char, or int2
inputs have been converted to newstyle. This should go a long way towards fixing our portability problems with platforms where char and short parameters are passed differently from int-width parameters. Still more to do for the Alpha port however.
Diffstat (limited to 'src/backend/utils/adt/geo_selfuncs.c')
-rw-r--r--src/backend/utils/adt/geo_selfuncs.c86
1 files changed, 19 insertions, 67 deletions
diff --git a/src/backend/utils/adt/geo_selfuncs.c b/src/backend/utils/adt/geo_selfuncs.c
index 5b77e1c330..e5f239612e 100644
--- a/src/backend/utils/adt/geo_selfuncs.c
+++ b/src/backend/utils/adt/geo_selfuncs.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_selfuncs.c,v 1.15 2000/05/13 06:04:46 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_selfuncs.c,v 1.16 2000/06/05 07:28:52 tgl Exp $
*
* XXX These are totally bogus. Perhaps someone will make them do
* something reasonable, someday.
@@ -44,32 +44,16 @@
* Selectivity for operators that depend on area, such as "overlap".
*/
-float64
-areasel(Oid opid,
- Oid relid,
- AttrNumber attno,
- Datum value,
- int32 flag)
+Datum
+areasel(PG_FUNCTION_ARGS)
{
- float64 result;
-
- result = (float64) palloc(sizeof(float64data));
- *result = 0.02;
- return result;
+ PG_RETURN_FLOAT8(0.02);
}
-float64
-areajoinsel(Oid opid,
- Oid relid1,
- AttrNumber attno1,
- Oid relid2,
- AttrNumber attno2)
+Datum
+areajoinsel(PG_FUNCTION_ARGS)
{
- float64 result;
-
- result = (float64) palloc(sizeof(float64data));
- *result = 0.02;
- return result;
+ PG_RETURN_FLOAT8(0.02);
}
/*
@@ -79,32 +63,16 @@ areajoinsel(Oid opid,
* a given box?
*/
-float64
-positionsel(Oid opid,
- Oid relid,
- AttrNumber attno,
- Datum value,
- int32 flag)
+Datum
+positionsel(PG_FUNCTION_ARGS)
{
- float64 result;
-
- result = (float64) palloc(sizeof(float64data));
- *result = 0.1;
- return result;
+ PG_RETURN_FLOAT8(0.1);
}
-float64
-positionjoinsel(Oid opid,
- Oid relid1,
- AttrNumber attno1,
- Oid relid2,
- AttrNumber attno2)
+Datum
+positionjoinsel(PG_FUNCTION_ARGS)
{
- float64 result;
-
- result = (float64) palloc(sizeof(float64data));
- *result = 0.1;
- return result;
+ PG_RETURN_FLOAT8(0.1);
}
/*
@@ -114,30 +82,14 @@ positionjoinsel(Oid opid,
* estimate than areasel does.
*/
-float64
-contsel(Oid opid,
- Oid relid,
- AttrNumber attno,
- Datum value,
- int32 flag)
+Datum
+contsel(PG_FUNCTION_ARGS)
{
- float64 result;
-
- result = (float64) palloc(sizeof(float64data));
- *result = 0.01;
- return result;
+ PG_RETURN_FLOAT8(0.01);
}
-float64
-contjoinsel(Oid opid,
- Oid relid1,
- AttrNumber attno1,
- Oid relid2,
- AttrNumber attno2)
+Datum
+contjoinsel(PG_FUNCTION_ARGS)
{
- float64 result;
-
- result = (float64) palloc(sizeof(float64data));
- *result = 0.01;
- return result;
+ PG_RETURN_FLOAT8(0.01);
}