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

Commitf25968c

Browse files
committed
Remove last traces of heap_open/close in the tree
Since pluggable storage has been introduced, those two routines havebeen replaced by table_open/close, with some compatibility macros stillpresent to allow extensions to compile correctly with v12.Some code paths using the old routines still remained, so replace them.Based on the discussion done, the consensus reached is that it is betterto remove those compatibility macros so as nothing new uses the oldroutines, so remove also the compatibility macros.Discussion:https://postgr.es/m/20191017014706.GF5605@paquier.xyz
1 parentec1259e commitf25968c

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

‎src/backend/commands/statscmds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ UpdateStatisticsForTypeChange(Oid statsOid, Oid relationOid, int attnum,
637637
replaces[Anum_pg_statistic_ext_data_stxdmcv-1]= true;
638638
nulls[Anum_pg_statistic_ext_data_stxdmcv-1]= true;
639639

640-
rel=heap_open(StatisticExtDataRelationId,RowExclusiveLock);
640+
rel=table_open(StatisticExtDataRelationId,RowExclusiveLock);
641641

642642
/* replace the old tuple */
643643
stup=heap_modify_tuple(oldtup,
@@ -651,7 +651,7 @@ UpdateStatisticsForTypeChange(Oid statsOid, Oid relationOid, int attnum,
651651

652652
heap_freetuple(stup);
653653

654-
heap_close(rel,RowExclusiveLock);
654+
table_close(rel,RowExclusiveLock);
655655
}
656656

657657
/*

‎src/backend/optimizer/util/plancat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2103,12 +2103,12 @@ has_stored_generated_columns(PlannerInfo *root, Index rti)
21032103
boolresult= false;
21042104

21052105
/* Assume we already have adequate lock */
2106-
relation=heap_open(rte->relid,NoLock);
2106+
relation=table_open(rte->relid,NoLock);
21072107

21082108
tupdesc=RelationGetDescr(relation);
21092109
result=tupdesc->constr&&tupdesc->constr->has_generated_stored;
21102110

2111-
heap_close(relation,NoLock);
2111+
table_close(relation,NoLock);
21122112

21132113
returnresult;
21142114
}

‎src/include/access/table.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,4 @@ extern Relation table_openrv_extended(const RangeVar *relation,
2525
LOCKMODElockmode,boolmissing_ok);
2626
externvoidtable_close(Relationrelation,LOCKMODElockmode);
2727

28-
/*
29-
* heap_ used to be the prefix for these routines, and a lot of code will just
30-
* continue to work without adaptions after the introduction of pluggable
31-
* storage, therefore just map these names.
32-
*/
33-
#defineheap_open(r,l)table_open(r, l)
34-
#defineheap_openrv(r,l)table_openrv(r, l)
35-
#defineheap_openrv_extended(r,l,m)table_openrv_extended(r, l, m)
36-
#defineheap_close(r,l)table_close(r, l)
37-
3828
#endif/* TABLE_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp