diff options
Diffstat (limited to 'src/include/nodes/primnodes.h')
-rw-r--r-- | src/include/nodes/primnodes.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h index bdeff737b63..7c3e0c6c4b8 100644 --- a/src/include/nodes/primnodes.h +++ b/src/include/nodes/primnodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: primnodes.h,v 1.39 2000/01/26 05:58:16 momjian Exp $ + * $Id: primnodes.h,v 1.40 2000/02/20 21:32:16 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -467,4 +467,28 @@ typedef struct ArrayRef Node *refassgnexpr; } ArrayRef; +/* ---------------- + * RelabelType + * arg - input expression + * resulttype - output type of coercion expression + * resulttypmod - output typmod (usually -1) + * + * RelabelType represents a "dummy" type coercion between two binary- + * compatible datatypes, such as reinterpreting the result of an OID + * expression as an int4. It is a no-op at runtime; we only need it + * to provide a place to store the correct type to be attributed to + * the expression result during type resolution. (We can't get away + * with just overwriting the type field of the input expression node, + * so we need a separate node to show the coercion's result type.) + * ---------------- + */ + +typedef struct RelabelType +{ + NodeTag type; + Node *arg; + Oid resulttype; + int32 resulttypmod; +} RelabelType; + #endif /* PRIMNODES_H */ |