mirror of
https://github.com/postgres/postgres.git
synced 2025-06-20 15:22:23 +03:00
Assign collations in partition bound expressions.
Failure to do this can result in errors during evaluation of the bound expression, as illustrated by the new regression test. Back-patch to v12 where the ability for partition bounds to be expressions was added. Discussion: https://postgr.es/m/CAJV4CdrZ5mKuaEsRSbLf2URQ3h6iMtKD=hik8MaF5WwdmC9uZw@mail.gmail.com
This commit is contained in:
@ -4209,6 +4209,7 @@ transformPartitionBoundValue(ParseState *pstate, Node *val,
|
||||
*/
|
||||
if (!IsA(value, Const))
|
||||
{
|
||||
assign_expr_collations(pstate, value);
|
||||
value = (Node *) expression_planner((Expr *) value);
|
||||
value = (Node *) evaluate_expr((Expr *) value, colType, colTypmod,
|
||||
partCollation);
|
||||
|
Reference in New Issue
Block a user