Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit42f74f4

Browse files
committed
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
1 parent5b93123 commit42f74f4

File tree

2 files changed

+0
-57
lines changed

2 files changed

+0
-57
lines changed

‎src/backend/partitioning/partdesc.c

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -351,60 +351,6 @@ DestroyPartitionDirectory(PartitionDirectory pdir)
351351
RelationDecrementReferenceCount(pde->rel);
352352
}
353353

354-
/*
355-
* equalPartitionDescs
356-
*Compare two partition descriptors for logical equality
357-
*/
358-
bool
359-
equalPartitionDescs(PartitionKeykey,PartitionDescpartdesc1,
360-
PartitionDescpartdesc2)
361-
{
362-
inti;
363-
364-
if (partdesc1!=NULL)
365-
{
366-
if (partdesc2==NULL)
367-
return false;
368-
if (partdesc1->nparts!=partdesc2->nparts)
369-
return false;
370-
371-
Assert(key!=NULL||partdesc1->nparts==0);
372-
373-
/*
374-
* Same oids? If the partitioning structure did not change, that is,
375-
* no partitions were added or removed to the relation, the oids array
376-
* should still match element-by-element.
377-
*/
378-
for (i=0;i<partdesc1->nparts;i++)
379-
{
380-
if (partdesc1->oids[i]!=partdesc2->oids[i])
381-
return false;
382-
}
383-
384-
/*
385-
* Now compare partition bound collections. The logic to iterate over
386-
* the collections is private to partition.c.
387-
*/
388-
if (partdesc1->boundinfo!=NULL)
389-
{
390-
if (partdesc2->boundinfo==NULL)
391-
return false;
392-
393-
if (!partition_bounds_equal(key->partnatts,key->parttyplen,
394-
key->parttypbyval,
395-
partdesc1->boundinfo,
396-
partdesc2->boundinfo))
397-
return false;
398-
}
399-
elseif (partdesc2->boundinfo!=NULL)
400-
return false;
401-
}
402-
elseif (partdesc2!=NULL)
403-
return false;
404-
405-
return true;
406-
}
407-
408354
/*
409355
* get_default_oid_from_partdesc
410356
*

‎src/include/partitioning/partdesc.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,4 @@ extern void DestroyPartitionDirectory(PartitionDirectory pdir);
3838

3939
externOidget_default_oid_from_partdesc(PartitionDescpartdesc);
4040

41-
externboolequalPartitionDescs(PartitionKeykey,PartitionDescpartdesc1,
42-
PartitionDescpartdesc2);
43-
4441
#endif/* PARTCACHE_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp