mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	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.
This commit is contained in:
		@@ -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/nodes.h,v 1.196 2007/02/20 17:32:17 tgl Exp $
 | 
			
		||||
 * $PostgreSQL: pgsql/src/include/nodes/nodes.h,v 1.197 2007/03/27 23:21:12 tgl Exp $
 | 
			
		||||
 *
 | 
			
		||||
 *-------------------------------------------------------------------------
 | 
			
		||||
 */
 | 
			
		||||
@@ -121,6 +121,7 @@ typedef enum NodeTag
 | 
			
		||||
	T_FieldSelect,
 | 
			
		||||
	T_FieldStore,
 | 
			
		||||
	T_RelabelType,
 | 
			
		||||
	T_ArrayCoerceExpr,
 | 
			
		||||
	T_ConvertRowtypeExpr,
 | 
			
		||||
	T_CaseExpr,
 | 
			
		||||
	T_CaseWhen,
 | 
			
		||||
@@ -159,6 +160,7 @@ typedef enum NodeTag
 | 
			
		||||
	T_SubPlanState,
 | 
			
		||||
	T_FieldSelectState,
 | 
			
		||||
	T_FieldStoreState,
 | 
			
		||||
	T_ArrayCoerceExprState,
 | 
			
		||||
	T_ConvertRowtypeExprState,
 | 
			
		||||
	T_CaseExprState,
 | 
			
		||||
	T_CaseWhenState,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user