summaryrefslogtreecommitdiff
path: root/src/include/tsearch
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/include/tsearch
parentbe939544a68f852107c912da2f35f5d36958deb2 (diff)
downloadpostgresql-8472bf7a73487b0535c95e299773b882f7523463.tar.gz
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/tsearch')
-rw-r--r--src/include/tsearch/ts_utils.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/include/tsearch/ts_utils.h b/src/include/tsearch/ts_utils.h
index bf0e33e58c..0085b64951 100644
--- a/src/include/tsearch/ts_utils.h
+++ b/src/include/tsearch/ts_utils.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1998-2008, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/include/tsearch/ts_utils.h,v 1.13 2008/03/25 22:42:45 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/tsearch/ts_utils.h,v 1.14 2008/04/21 00:26:47 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -178,6 +178,11 @@ typedef uint64 TSQuerySign;
#define TSQS_SIGLEN (sizeof(TSQuerySign)*BITS_PER_BYTE)
+#define TSQuerySignGetDatum(X) Int64GetDatum((int64) (X))
+#define DatumGetTSQuerySign(X) ((TSQuerySign) DatumGetInt64(X))
+#define PG_RETURN_TSQUERYSIGN(X) return TSQuerySignGetDatum(X)
+#define PG_GETARG_TSQUERYSIGN(n) DatumGetTSQuerySign(PG_GETARG_DATUM(n))
+
extern QTNode *QT2QTN(QueryItem *in, char *operand);
extern TSQuery QTN2QT(QTNode *in);