mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Renaming for new subscripting mechanism
Over at patch https://commitfest.postgresql.org/21/1062/ Dmitry wants to introduce a more generic subscription mechanism, which allows subscripting not only arrays but also other object types such as JSONB. That functionality is introduced in a largish invasive patch, out of which this internal renaming patch was extracted. Author: Dmitry Dolgov Reviewed-by: Tom Lane, Arthur Zakirov Discussion: https://postgr.es/m/CA+q6zcUK4EqPAu7XRRO5CCjMwhz5zvg+rfWuLzVoxp_5sKS6=w@mail.gmail.com
This commit is contained in:
@ -1120,11 +1120,15 @@ contain_nonstrict_functions_walker(Node *node, void *context)
|
||||
/* a window function could return non-null with null input */
|
||||
return true;
|
||||
}
|
||||
if (IsA(node, ArrayRef))
|
||||
if (IsA(node, SubscriptingRef))
|
||||
{
|
||||
/* array assignment is nonstrict, but subscripting is strict */
|
||||
if (((ArrayRef *) node)->refassgnexpr != NULL)
|
||||
/*
|
||||
* subscripting assignment is nonstrict, but subscripting itself is
|
||||
* strict
|
||||
*/
|
||||
if (((SubscriptingRef *) node)->refassgnexpr != NULL)
|
||||
return true;
|
||||
|
||||
/* else fall through to check args */
|
||||
}
|
||||
if (IsA(node, DistinctExpr))
|
||||
@ -1328,7 +1332,6 @@ contain_leaked_vars_walker(Node *node, void *context)
|
||||
case T_Var:
|
||||
case T_Const:
|
||||
case T_Param:
|
||||
case T_ArrayRef:
|
||||
case T_ArrayExpr:
|
||||
case T_FieldSelect:
|
||||
case T_FieldStore:
|
||||
@ -1358,6 +1361,7 @@ contain_leaked_vars_walker(Node *node, void *context)
|
||||
case T_ScalarArrayOpExpr:
|
||||
case T_CoerceViaIO:
|
||||
case T_ArrayCoerceExpr:
|
||||
case T_SubscriptingRef:
|
||||
|
||||
/*
|
||||
* If node contains a leaky function call, and there's any Var
|
||||
@ -3181,7 +3185,7 @@ eval_const_expressions_mutator(Node *node,
|
||||
else
|
||||
return copyObject(node);
|
||||
}
|
||||
case T_ArrayRef:
|
||||
case T_SubscriptingRef:
|
||||
case T_ArrayExpr:
|
||||
case T_RowExpr:
|
||||
case T_MinMaxExpr:
|
||||
|
Reference in New Issue
Block a user