diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2019-12-25 14:45:57 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2019-12-25 14:45:57 -0500 |
commit | 42f74f49367bee1d3da28c4b383faec29364f320 (patch) | |
tree | a3f130695a6dadd9d228354da548e8bc8ee7931f /src | |
parent | 5b9312378e2f8fb35ef4584aea351c3319a10422 (diff) | |
download | postgresql-42f74f49367bee1d3da28c4b383faec29364f320.tar.gz postgresql-42f74f49367bee1d3da28c4b383faec29364f320.zip |
Remove equalPartitionDescs().
This is dead code in the wake of the previous commit.
We can always add it back if we need it again someday.
Discussion: https://postgr.es/m/CA+HiwqFUzjfj9HEsJtYWcr1SgQ_=iCAvQ=O2Sx6aQxoDu4OiHw@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/partitioning/partdesc.c | 54 | ||||
-rw-r--r-- | src/include/partitioning/partdesc.h | 3 |
2 files changed, 0 insertions, 57 deletions
diff --git a/src/backend/partitioning/partdesc.c b/src/backend/partitioning/partdesc.c index a6e397940b2..694ed923e02 100644 --- a/src/backend/partitioning/partdesc.c +++ b/src/backend/partitioning/partdesc.c @@ -352,60 +352,6 @@ DestroyPartitionDirectory(PartitionDirectory pdir) } /* - * equalPartitionDescs - * Compare two partition descriptors for logical equality - */ -bool -equalPartitionDescs(PartitionKey key, PartitionDesc partdesc1, - PartitionDesc partdesc2) -{ - int i; - - if (partdesc1 != NULL) - { - if (partdesc2 == NULL) - return false; - if (partdesc1->nparts != partdesc2->nparts) - return false; - - Assert(key != NULL || partdesc1->nparts == 0); - - /* - * Same oids? If the partitioning structure did not change, that is, - * no partitions were added or removed to the relation, the oids array - * should still match element-by-element. - */ - for (i = 0; i < partdesc1->nparts; i++) - { - if (partdesc1->oids[i] != partdesc2->oids[i]) - return false; - } - - /* - * Now compare partition bound collections. The logic to iterate over - * the collections is private to partition.c. - */ - if (partdesc1->boundinfo != NULL) - { - if (partdesc2->boundinfo == NULL) - return false; - - if (!partition_bounds_equal(key->partnatts, key->parttyplen, - key->parttypbyval, - partdesc1->boundinfo, - partdesc2->boundinfo)) - return false; - } - else if (partdesc2->boundinfo != NULL) - return false; - } - else if (partdesc2 != NULL) - return false; - - return true; -} - -/* * get_default_oid_from_partdesc * * Given a partition descriptor, return the OID of the default partition, if diff --git a/src/include/partitioning/partdesc.h b/src/include/partitioning/partdesc.h index 825bdd76ab5..23be527a5a4 100644 --- a/src/include/partitioning/partdesc.h +++ b/src/include/partitioning/partdesc.h @@ -38,7 +38,4 @@ extern void DestroyPartitionDirectory(PartitionDirectory pdir); extern Oid get_default_oid_from_partdesc(PartitionDesc partdesc); -extern bool equalPartitionDescs(PartitionKey key, PartitionDesc partdesc1, - PartitionDesc partdesc2); - #endif /* PARTCACHE_H */ |