aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/table/tableam.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2019-05-23 16:25:48 -0700
committerAndres Freund <andres@anarazel.de>2019-05-23 16:32:36 -0700
commit73b8c3bd2889fed986044e15aefd0911f96ccdd3 (patch)
tree8fcd867ac811feecc99ed5f645088b73c44d5051 /src/backend/access/table/tableam.c
parent54487d1560619a0027e0651d1b8d715ca8fc388c (diff)
downloadpostgresql-73b8c3bd2889fed986044e15aefd0911f96ccdd3.tar.gz
postgresql-73b8c3bd2889fed986044e15aefd0911f96ccdd3.zip
tableam: Rename wrapper functions to match callback names.
Some of the wrapper functions didn't match the callback names. Many of them due to staying "consistent" with historic naming of the wrapped functionality. We decided that for most cases it's more important to be for tableam to be consistent going forward, than with the past. The one exception is beginscan/endscan/... because it'd have looked odd to have systable_beginscan/endscan/... with a different naming scheme, and changing the systable_* APIs would have caused way too much churn (including breaking a lot of external users). Author: Ashwin Agrawal, with some small additions by Andres Freund Reviewed-By: Andres Freund Discussion: https://postgr.es/m/CALfoeiugyrXZfX7n0ORCa4L-m834dzmaE8eFdbNR6PMpetU4Ww@mail.gmail.com
Diffstat (limited to 'src/backend/access/table/tableam.c')
-rw-r--r--src/backend/access/table/tableam.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/backend/access/table/tableam.c b/src/backend/access/table/tableam.c
index 12adf590853..7d9fc6bb137 100644
--- a/src/backend/access/table/tableam.c
+++ b/src/backend/access/table/tableam.c
@@ -221,7 +221,7 @@ table_index_fetch_tuple_check(Relation rel,
*/
void
-table_get_latest_tid(TableScanDesc scan, ItemPointer tid)
+table_tuple_get_latest_tid(TableScanDesc scan, ItemPointer tid)
{
Relation rel = scan->rs_rd;
const TableAmRoutine *tableam = rel->rd_tableam;
@@ -248,19 +248,19 @@ table_get_latest_tid(TableScanDesc scan, ItemPointer tid)
*/
/*
- * simple_table_insert - insert a tuple
+ * simple_table_tuple_insert - insert a tuple
*
- * Currently, this routine differs from table_insert only in supplying a
+ * Currently, this routine differs from table_tuple_insert only in supplying a
* default command ID and not allowing access to the speedup options.
*/
void
-simple_table_insert(Relation rel, TupleTableSlot *slot)
+simple_table_tuple_insert(Relation rel, TupleTableSlot *slot)
{
- table_insert(rel, slot, GetCurrentCommandId(true), 0, NULL);
+ table_tuple_insert(rel, slot, GetCurrentCommandId(true), 0, NULL);
}
/*
- * simple_table_delete - delete a tuple
+ * simple_table_tuple_delete - delete a tuple
*
* This routine may be used to delete a tuple when concurrent updates of
* the target tuple are not expected (for example, because we have a lock
@@ -268,16 +268,16 @@ simple_table_insert(Relation rel, TupleTableSlot *slot)
* via ereport().
*/
void
-simple_table_delete(Relation rel, ItemPointer tid, Snapshot snapshot)
+simple_table_tuple_delete(Relation rel, ItemPointer tid, Snapshot snapshot)
{
TM_Result result;
TM_FailureData tmfd;
- result = table_delete(rel, tid,
- GetCurrentCommandId(true),
- snapshot, InvalidSnapshot,
- true /* wait for commit */ ,
- &tmfd, false /* changingPart */ );
+ result = table_tuple_delete(rel, tid,
+ GetCurrentCommandId(true),
+ snapshot, InvalidSnapshot,
+ true /* wait for commit */ ,
+ &tmfd, false /* changingPart */ );
switch (result)
{
@@ -299,13 +299,13 @@ simple_table_delete(Relation rel, ItemPointer tid, Snapshot snapshot)
break;
default:
- elog(ERROR, "unrecognized table_delete status: %u", result);
+ elog(ERROR, "unrecognized table_tuple_delete status: %u", result);
break;
}
}
/*
- * simple_table_update - replace a tuple
+ * simple_table_tuple_update - replace a tuple
*
* This routine may be used to update a tuple when concurrent updates of
* the target tuple are not expected (for example, because we have a lock
@@ -313,20 +313,20 @@ simple_table_delete(Relation rel, ItemPointer tid, Snapshot snapshot)
* via ereport().
*/
void
-simple_table_update(Relation rel, ItemPointer otid,
- TupleTableSlot *slot,
- Snapshot snapshot,
- bool *update_indexes)
+simple_table_tuple_update(Relation rel, ItemPointer otid,
+ TupleTableSlot *slot,
+ Snapshot snapshot,
+ bool *update_indexes)
{
TM_Result result;
TM_FailureData tmfd;
LockTupleMode lockmode;
- result = table_update(rel, otid, slot,
- GetCurrentCommandId(true),
- snapshot, InvalidSnapshot,
- true /* wait for commit */ ,
- &tmfd, &lockmode, update_indexes);
+ result = table_tuple_update(rel, otid, slot,
+ GetCurrentCommandId(true),
+ snapshot, InvalidSnapshot,
+ true /* wait for commit */ ,
+ &tmfd, &lockmode, update_indexes);
switch (result)
{
@@ -348,7 +348,7 @@ simple_table_update(Relation rel, ItemPointer otid,
break;
default:
- elog(ERROR, "unrecognized table_update status: %u", result);
+ elog(ERROR, "unrecognized table_tuple_update status: %u", result);
break;
}