diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-06-13 07:35:40 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-06-13 07:35:40 +0000 |
commit | f2d120532207b8873a5e74e7350dd2904f377289 (patch) | |
tree | 992c89e023c4b29b42bf4fd6563de91f8d6ec8ca /src/include/utils/numeric.h | |
parent | 8f057d971d663fff9bbb2ae7d053bf71cf09b4a2 (diff) |
Another batch of fmgr updates. I think I have gotten all old-style
functions that take pass-by-value datatypes. Should be ready for
port testing ...
Diffstat (limited to 'src/include/utils/numeric.h')
-rw-r--r-- | src/include/utils/numeric.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/include/utils/numeric.h b/src/include/utils/numeric.h index 1b3864dc0dd..1a0dd692dbd 100644 --- a/src/include/utils/numeric.h +++ b/src/include/utils/numeric.h @@ -5,7 +5,7 @@ * * 1998 Jan Wieck * - * $Header: /cvsroot/pgsql/src/include/utils/numeric.h,v 1.9 2000/04/12 17:16:55 momjian Exp $ + * $Header: /cvsroot/pgsql/src/include/utils/numeric.h,v 1.10 2000/06/13 07:35:31 tgl Exp $ * * ---------- */ @@ -71,4 +71,13 @@ typedef NumericData *Numeric; #define NUMERIC_HDRSZ (sizeof(int32) + sizeof(uint16) * 3) +/* + * fmgr interface macros + */ + +#define DatumGetNumeric(X) ((Numeric) PG_DETOAST_DATUM(X)) +#define NumericGetDatum(X) PointerGetDatum(X) +#define PG_GETARG_NUMERIC(n) DatumGetNumeric(PG_GETARG_DATUM(n)) +#define PG_RETURN_NUMERIC(x) return NumericGetDatum(x) + #endif /* _PG_NUMERIC_H_ */ |