summaryrefslogtreecommitdiff
path: root/src/include/fmgr.h
diff options
context:
space:
mode:
authorTom Lane2008-04-21 00:26:47 +0000
committerTom Lane2008-04-21 00:26:47 +0000
commit8472bf7a73487b0535c95e299773b882f7523463 (patch)
treef8cf1ad8529e819aec4d93cdcbf848996f4e3680 /src/include/fmgr.h
parentbe939544a68f852107c912da2f35f5d36958deb2 (diff)
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/include/fmgr.h')
-rw-r--r--src/include/fmgr.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/include/fmgr.h b/src/include/fmgr.h
index 07bce55ee1f..ec3261b081a 100644
--- a/src/include/fmgr.h
+++ b/src/include/fmgr.h
@@ -11,7 +11,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/fmgr.h,v 1.57 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/fmgr.h,v 1.58 2008/04/21 00:26:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -353,6 +353,9 @@ extern int no_such_variable
* are custom-configurable and especially likely to break dynamically loaded
* modules if they were compiled with other values. Also, the length field
* can be used to detect definition changes.
+ *
+ * Note: we compare magic blocks with memcmp(), so there had better not be
+ * any alignment pad bytes in them.
*-------------------------------------------------------------------------
*/
@@ -364,6 +367,8 @@ typedef struct
int funcmaxargs; /* FUNC_MAX_ARGS */
int indexmaxkeys; /* INDEX_MAX_KEYS */
int namedatalen; /* NAMEDATALEN */
+ int float4byval; /* FLOAT4PASSBYVAL */
+ int float8byval; /* FLOAT8PASSBYVAL */
} Pg_magic_struct;
/* The actual data block contents */
@@ -373,7 +378,9 @@ typedef struct
PG_VERSION_NUM / 100, \
FUNC_MAX_ARGS, \
INDEX_MAX_KEYS, \
- NAMEDATALEN \
+ NAMEDATALEN, \
+ FLOAT4PASSBYVAL, \
+ FLOAT8PASSBYVAL \
}
/*