summaryrefslogtreecommitdiff
path: root/src/pl
diff options
context:
space:
mode:
authorTom Lane2007-03-27 23:21:12 +0000
committerTom Lane2007-03-27 23:21:12 +0000
commitbf94076348ef7e0a81e3fe4ededb2fdcd14b303b (patch)
treee513ac49a62f2fbde540bbc57b3e162d7ff13624 /src/pl
parent87564ffc6a87c6cdcc669472892be2ef0870a0f3 (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/pl')
-rw-r--r--src/pl/plpgsql/src/pl_exec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c
index 165ce0426ec..41d2b3e5448 100644
--- a/src/pl/plpgsql/src/pl_exec.c
+++ b/src/pl/plpgsql/src/pl_exec.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.191 2007/03/25 23:27:59 tgl Exp $
+ * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.192 2007/03/27 23:21:12 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -4563,6 +4563,9 @@ exec_simple_check_node(Node *node)
case T_RelabelType:
return exec_simple_check_node((Node *) ((RelabelType *) node)->arg);
+ case T_ArrayCoerceExpr:
+ return exec_simple_check_node((Node *) ((ArrayCoerceExpr *) node)->arg);
+
case T_ConvertRowtypeExpr:
return exec_simple_check_node((Node *) ((ConvertRowtypeExpr *) node)->arg);