Skip to content

Commit b2e4399

Browse files
committed
Code review for make_partition_op_expr.
It's better to use the actual keynum here rather than 0, because someday someone might try to make list partitioning work with multiple partitioning columns. Jeevan Ladhe Discussion: http://postgr.es/m/CAOgcT0M6-mx+dSX47JGJuJP1CKr4XssBFVmKNETt0OZYWpFr+w@mail.gmail.com
1 parent 05b5feb commit b2e4399

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/catalog/partition.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,7 @@ make_partition_op_expr(PartitionKey key, int keynum,
12661266
saopexpr->opno = operoid;
12671267
saopexpr->opfuncid = get_opcode(operoid);
12681268
saopexpr->useOr = true;
1269-
saopexpr->inputcollid = key->partcollation[0];
1269+
saopexpr->inputcollid = key->partcollation[keynum];
12701270
saopexpr->args = list_make2(arg1, arg2);
12711271
saopexpr->location = -1;
12721272

0 commit comments

Comments
 (0)