Skip to content

Commit c203dcd

Browse files
committed
Remove unused function parameter in get_qual_from_partbound
Commit 0563a3a changed how partition constraints were generated such that this function no longer computes the mapping of parent attnos to child attnos. This is an external function that extensions could use, so this is potentially a breaking change. No external callers are known, however, and this will make it simpler to write such callers in the future. Author: Hou Zhijie Reviewed-by: David Rowley, Michael Paquier, Soumyadeep Chakraborty Discussion: https://www.postgresql.org/message-id/flat/OS0PR01MB5716A75A45BE46101A1B489894379@OS0PR01MB5716.jpnprd01.prod.outlook.com
1 parent eec5711 commit c203dcd

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

src/backend/commands/tablecmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17350,7 +17350,7 @@ ATExecAttachPartition(List **wqueue, Relation rel, PartitionCmd *cmd,
1735017350
* If the parent itself is a partition, make sure to include its
1735117351
* constraint as well.
1735217352
*/
17353-
partBoundConstraint = get_qual_from_partbound(attachrel, rel, cmd->bound);
17353+
partBoundConstraint = get_qual_from_partbound(rel, cmd->bound);
1735417354
partConstraint = list_concat(partBoundConstraint,
1735517355
RelationGetPartitionQual(rel));
1735617356

src/backend/partitioning/partbounds.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,7 @@ static List *get_range_nulltest(PartitionKey key);
246246
* expressions as partition constraint
247247
*/
248248
List *
249-
get_qual_from_partbound(Relation rel, Relation parent,
250-
PartitionBoundSpec *spec)
249+
get_qual_from_partbound(Relation parent, PartitionBoundSpec *spec)
251250
{
252251
PartitionKey key = RelationGetPartitionKey(parent);
253252
List *my_qual = NIL;

src/backend/utils/cache/partcache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ generate_partition_qual(Relation rel)
376376
bound = castNode(PartitionBoundSpec,
377377
stringToNode(TextDatumGetCString(boundDatum)));
378378

379-
my_qual = get_qual_from_partbound(rel, parent, bound);
379+
my_qual = get_qual_from_partbound(parent, bound);
380380
}
381381

382382
ReleaseSysCache(tuple);

src/include/partitioning/partbounds.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ extern int get_hash_partition_greatest_modulus(PartitionBoundInfo b);
8585
extern uint64 compute_partition_hash_value(int partnatts, FmgrInfo *partsupfunc,
8686
Oid *partcollation,
8787
Datum *values, bool *isnull);
88-
extern List *get_qual_from_partbound(Relation rel, Relation parent,
88+
extern List *get_qual_from_partbound(Relation parent,
8989
PartitionBoundSpec *spec);
9090
extern PartitionBoundInfo partition_bounds_create(PartitionBoundSpec **boundspecs,
9191
int nparts, PartitionKey key, int **mapping);

0 commit comments

Comments
 (0)