aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/float.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-04-21 00:26:47 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-04-21 00:26:47 +0000
commit8472bf7a73487b0535c95e299773b882f7523463 (patch)
treef8cf1ad8529e819aec4d93cdcbf848996f4e3680 /src/backend/utils/adt/float.c
parentbe939544a68f852107c912da2f35f5d36958deb2 (diff)
downloadpostgresql-8472bf7a73487b0535c95e299773b882f7523463.tar.gz
postgresql-8472bf7a73487b0535c95e299773b882f7523463.zip
Allow float8, int8, and related datatypes to be passed by value on machines
where Datum is 8 bytes wide. Since this will break old-style C functions (those still using version 0 calling convention) that have arguments or results of these types, provide a configure option to disable it and retain the old pass-by-reference behavior. Likewise, provide a configure option to disable the recently-committed float4 pass-by-value change. Zoltan Boszormenyi, plus configurability stuff by me.
Diffstat (limited to 'src/backend/utils/adt/float.c')
-rw-r--r--src/backend/utils/adt/float.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c
index 2f1e262ea7a..2ee2455089e 100644
--- a/src/backend/utils/adt/float.c
+++ b/src/backend/utils/adt/float.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.154 2008/03/10 12:39:22 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.155 2008/04/21 00:26:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1780,7 +1780,7 @@ float8_accum(PG_FUNCTION_ARGS)
result = construct_array(transdatums, 3,
FLOAT8OID,
- sizeof(float8), false /* float8 byval */ , 'd');
+ sizeof(float8), FLOAT8PASSBYVAL, 'd');
PG_RETURN_ARRAYTYPE_P(result);
}
@@ -1833,7 +1833,7 @@ float4_accum(PG_FUNCTION_ARGS)
result = construct_array(transdatums, 3,
FLOAT8OID,
- sizeof(float8), false /* float8 byval */ , 'd');
+ sizeof(float8), FLOAT8PASSBYVAL, 'd');
PG_RETURN_ARRAYTYPE_P(result);
}
@@ -2056,8 +2056,7 @@ float8_regr_accum(PG_FUNCTION_ARGS)
result = construct_array(transdatums, 6,
FLOAT8OID,
- sizeof(float8),
- false /* float8 byval */ , 'd');
+ sizeof(float8), FLOAT8PASSBYVAL, 'd');
PG_RETURN_ARRAYTYPE_P(result);
}