diff options
| author | Bruce Momjian | 2002-04-24 02:12:53 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2002-04-24 02:12:53 +0000 |
| commit | 5d2fdf6e6d0aa397eee8b5946ba705917e5bf695 (patch) | |
| tree | 72535777186fc1c8a1234ec35c9540e963b1703a /src/include/fmgr.h | |
| parent | be9728acf1395ee45d82aa1e922570a82f9d040f (diff) | |
Here's a patch to add unknownin/unknownout support. I also poked around
looking for places that assume UNKNOWN == TEXT. One of those was the
"SET" type in pg_type.h, which was using textin/textout. This one I took
care of in this patch. The other suspicious place was in
string_to_dataum (which is defined in both selfuncs.c and indxpath.c). I
wasn't too sure about those, so I left them be.
Joe Conway
Diffstat (limited to 'src/include/fmgr.h')
| -rw-r--r-- | src/include/fmgr.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/include/fmgr.h b/src/include/fmgr.h index 017f73fb757..6280ff294a7 100644 --- a/src/include/fmgr.h +++ b/src/include/fmgr.h @@ -11,7 +11,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: fmgr.h,v 1.19 2002/03/05 05:33:22 momjian Exp $ + * $Id: fmgr.h,v 1.20 2002/04/24 02:12:53 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -185,6 +185,7 @@ extern struct varlena *pg_detoast_datum_slice(struct varlena * datum, /* DatumGetFoo macros for varlena types will typically look like this: */ #define DatumGetByteaP(X) ((bytea *) PG_DETOAST_DATUM(X)) #define DatumGetTextP(X) ((text *) PG_DETOAST_DATUM(X)) +#define DatumGetUnknownP(X) ((unknown *) PG_DETOAST_DATUM(X)) #define DatumGetBpCharP(X) ((BpChar *) PG_DETOAST_DATUM(X)) #define DatumGetVarCharP(X) ((VarChar *) PG_DETOAST_DATUM(X)) /* And we also offer variants that return an OK-to-write copy */ @@ -200,6 +201,7 @@ extern struct varlena *pg_detoast_datum_slice(struct varlena * datum, /* GETARG macros for varlena types will typically look like this: */ #define PG_GETARG_BYTEA_P(n) DatumGetByteaP(PG_GETARG_DATUM(n)) #define PG_GETARG_TEXT_P(n) DatumGetTextP(PG_GETARG_DATUM(n)) +#define PG_GETARG_UNKNOWN_P(n) DatumGetUnknownP(PG_GETARG_DATUM(n)) #define PG_GETARG_BPCHAR_P(n) DatumGetBpCharP(PG_GETARG_DATUM(n)) #define PG_GETARG_VARCHAR_P(n) DatumGetVarCharP(PG_GETARG_DATUM(n)) /* And we also offer variants that return an OK-to-write copy */ @@ -239,6 +241,7 @@ extern struct varlena *pg_detoast_datum_slice(struct varlena * datum, /* RETURN macros for other pass-by-ref types will typically look like this: */ #define PG_RETURN_BYTEA_P(x) PG_RETURN_POINTER(x) #define PG_RETURN_TEXT_P(x) PG_RETURN_POINTER(x) +#define PG_RETURN_UNKNOWN_P(x) PG_RETURN_POINTER(x) #define PG_RETURN_BPCHAR_P(x) PG_RETURN_POINTER(x) #define PG_RETURN_VARCHAR_P(x) PG_RETURN_POINTER(x) |
