diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-03-27 23:21:12 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-03-27 23:21:12 +0000 |
commit | bf94076348ef7e0a81e3fe4ededb2fdcd14b303b (patch) | |
tree | e513ac49a62f2fbde540bbc57b3e162d7ff13624 /src/include/nodes/execnodes.h | |
parent | 87564ffc6a87c6cdcc669472892be2ef0870a0f3 (diff) |
Fix array coercion expressions to ensure that the correct volatility is
seen by code inspecting the expression. The best way to do this seems
to be to drop the original representation as a function invocation, and
instead make a special expression node type that represents applying
the element-type coercion function to each array element. In this way
the element function is exposed and will be checked for volatility.
Per report from Guillaume Smet.
Diffstat (limited to 'src/include/nodes/execnodes.h')
-rw-r--r-- | src/include/nodes/execnodes.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index fe9ce9a4bf8..56bac9350f5 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.170 2007/02/27 01:11:26 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.171 2007/03/27 23:21:12 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -626,6 +626,20 @@ typedef struct FieldStoreState } FieldStoreState; /* ---------------- + * ArrayCoerceExprState node + * ---------------- + */ +typedef struct ArrayCoerceExprState +{ + ExprState xprstate; + ExprState *arg; /* input array value */ + Oid resultelemtype; /* element type of result array */ + FmgrInfo elemfunc; /* lookup info for element coercion function */ + /* use struct pointer to avoid including array.h here */ + struct ArrayMapState *amstate; /* workspace for array_map */ +} ArrayCoerceExprState; + +/* ---------------- * ConvertRowtypeExprState node * ---------------- */ |