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

Commit041a264

Browse files
committed
Fix some typos and inconsistencies in tableam.h
The defined callback definitions have been using references to heap fora couple of variables and comments. This makes the whole interface moreconsistent by using "table" which is more generic.A variable storing index information was misspelled as well.Author: Michael PaquierDiscussion:https://postgr.es/m/20190601190946.GB1905@paquier.xyz
1 parent2cd4e83 commit041a264

File tree

1 file changed

+45
-45
lines changed

1 file changed

+45
-45
lines changed

‎src/include/access/tableam.h

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -470,8 +470,8 @@ typedef struct TableAmRoutine
470470
constRelFileNode*newrnode);
471471

472472
/* See table_relation_copy_for_cluster() */
473-
void(*relation_copy_for_cluster) (RelationNewHeap,
474-
RelationOldHeap,
473+
void(*relation_copy_for_cluster) (RelationNewTable,
474+
RelationOldTable,
475475
RelationOldIndex,
476476
booluse_sort,
477477
TransactionIdOldestXmin,
@@ -536,9 +536,9 @@ typedef struct TableAmRoutine
536536
TupleTableSlot*slot);
537537

538538
/* see table_index_build_range_scan for reference about parameters */
539-
double(*index_build_range_scan) (Relationheap_rel,
539+
double(*index_build_range_scan) (Relationtable_rel,
540540
Relationindex_rel,
541-
structIndexInfo*index_nfo,
541+
structIndexInfo*index_info,
542542
boolallow_sync,
543543
boolanyvisible,
544544
boolprogress,
@@ -549,7 +549,7 @@ typedef struct TableAmRoutine
549549
TableScanDescscan);
550550

551551
/* see table_index_validate_scan for reference about parameters */
552-
void(*index_validate_scan) (Relationheap_rel,
552+
void(*index_validate_scan) (Relationtable_rel,
553553
Relationindex_rel,
554554
structIndexInfo*index_info,
555555
Snapshotsnapshot,
@@ -1377,7 +1377,7 @@ table_relation_copy_data(Relation rel, const RelFileNode *newrnode)
13771377
}
13781378

13791379
/*
1380-
* Copy data from `OldHeap` into `NewHeap`, as part of a CLUSTER or VACUUM
1380+
* Copy data from `OldTable` into `NewTable`, as part of a CLUSTER or VACUUM
13811381
* FULL.
13821382
*
13831383
* Additional Input parameters:
@@ -1398,7 +1398,7 @@ table_relation_copy_data(Relation rel, const RelFileNode *newrnode)
13981398
* - *tups_recently_dead - stats, for logging, if appropriate for AM
13991399
*/
14001400
staticinlinevoid
1401-
table_relation_copy_for_cluster(RelationOldHeap,RelationNewHeap,
1401+
table_relation_copy_for_cluster(RelationOldTable,RelationNewTable,
14021402
RelationOldIndex,
14031403
booluse_sort,
14041404
TransactionIdOldestXmin,
@@ -1408,11 +1408,11 @@ table_relation_copy_for_cluster(Relation OldHeap, Relation NewHeap,
14081408
double*tups_vacuumed,
14091409
double*tups_recently_dead)
14101410
{
1411-
OldHeap->rd_tableam->relation_copy_for_cluster(OldHeap,NewHeap,OldIndex,
1412-
use_sort,OldestXmin,
1413-
xid_cutoff,multi_cutoff,
1414-
num_tuples,tups_vacuumed,
1415-
tups_recently_dead);
1411+
OldTable->rd_tableam->relation_copy_for_cluster(OldTable,NewTable,OldIndex,
1412+
use_sort,OldestXmin,
1413+
xid_cutoff,multi_cutoff,
1414+
num_tuples,tups_vacuumed,
1415+
tups_recently_dead);
14161416
}
14171417

14181418
/*
@@ -1473,7 +1473,7 @@ table_scan_analyze_next_tuple(TableScanDesc scan, TransactionId OldestXmin,
14731473
* table_index_build_scan - scan the table to find tuples to be indexed
14741474
*
14751475
* This is called back from an access-method-specific index build procedure
1476-
* after the AM has done whatever setup it needs. The parentheap relation
1476+
* after the AM has done whatever setup it needs. The parenttable relation
14771477
* is scanned to find tuples that should be entered into the index. Each
14781478
* such tuple is passed to the AM's callback routine, which does the right
14791479
* things to add it to the new index. After we return, the AM's index
@@ -1497,26 +1497,26 @@ table_scan_analyze_next_tuple(TableScanDesc scan, TransactionId OldestXmin,
14971497
* for other AMs later.
14981498
*/
14991499
staticinlinedouble
1500-
table_index_build_scan(Relationheap_rel,
1500+
table_index_build_scan(Relationtable_rel,
15011501
Relationindex_rel,
1502-
structIndexInfo*index_nfo,
1502+
structIndexInfo*index_info,
15031503
boolallow_sync,
15041504
boolprogress,
15051505
IndexBuildCallbackcallback,
15061506
void*callback_state,
15071507
TableScanDescscan)
15081508
{
1509-
returnheap_rel->rd_tableam->index_build_range_scan(heap_rel,
1510-
index_rel,
1511-
index_nfo,
1512-
allow_sync,
1513-
false,
1514-
progress,
1515-
0,
1516-
InvalidBlockNumber,
1517-
callback,
1518-
callback_state,
1519-
scan);
1509+
returntable_rel->rd_tableam->index_build_range_scan(table_rel,
1510+
index_rel,
1511+
index_info,
1512+
allow_sync,
1513+
false,
1514+
progress,
1515+
0,
1516+
InvalidBlockNumber,
1517+
callback,
1518+
callback_state,
1519+
scan);
15201520
}
15211521

15221522
/*
@@ -1530,9 +1530,9 @@ table_index_build_scan(Relation heap_rel,
15301530
* transactions that are still in progress.
15311531
*/
15321532
staticinlinedouble
1533-
table_index_build_range_scan(Relationheap_rel,
1533+
table_index_build_range_scan(Relationtable_rel,
15341534
Relationindex_rel,
1535-
structIndexInfo*index_nfo,
1535+
structIndexInfo*index_info,
15361536
boolallow_sync,
15371537
boolanyvisible,
15381538
boolprogress,
@@ -1542,17 +1542,17 @@ table_index_build_range_scan(Relation heap_rel,
15421542
void*callback_state,
15431543
TableScanDescscan)
15441544
{
1545-
returnheap_rel->rd_tableam->index_build_range_scan(heap_rel,
1546-
index_rel,
1547-
index_nfo,
1548-
allow_sync,
1549-
anyvisible,
1550-
progress,
1551-
start_blockno,
1552-
numblocks,
1553-
callback,
1554-
callback_state,
1555-
scan);
1545+
returntable_rel->rd_tableam->index_build_range_scan(table_rel,
1546+
index_rel,
1547+
index_info,
1548+
allow_sync,
1549+
anyvisible,
1550+
progress,
1551+
start_blockno,
1552+
numblocks,
1553+
callback,
1554+
callback_state,
1555+
scan);
15561556
}
15571557

15581558
/*
@@ -1561,17 +1561,17 @@ table_index_build_range_scan(Relation heap_rel,
15611561
* See validate_index() for an explanation.
15621562
*/
15631563
staticinlinevoid
1564-
table_index_validate_scan(Relationheap_rel,
1564+
table_index_validate_scan(Relationtable_rel,
15651565
Relationindex_rel,
15661566
structIndexInfo*index_info,
15671567
Snapshotsnapshot,
15681568
structValidateIndexState*state)
15691569
{
1570-
heap_rel->rd_tableam->index_validate_scan(heap_rel,
1571-
index_rel,
1572-
index_info,
1573-
snapshot,
1574-
state);
1570+
table_rel->rd_tableam->index_validate_scan(table_rel,
1571+
index_rel,
1572+
index_info,
1573+
snapshot,
1574+
state);
15751575
}
15761576

15771577

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp