From: Alexander Korotkov Date: Mon, 25 Mar 2024 23:53:34 +0000 (+0200) Subject: Add comments on some MinimalTupleSlots methods usage X-Git-Tag: REL_17_BETA1~516 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=10baee0c95d15f70c0c2b0e52640651777ce806d;p=thirdparty%2Fpostgresql.git Add comments on some MinimalTupleSlots methods usage Discussion: https://postgr.es/m/CALT9ZEHNeagO5PLb4Nv9J_ZaCtp%2BArdVmbSLc0RHUzx_RPAa4w%40mail.gmail.com Author: Pavel Borisov --- diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c index 7a7c7860416..b5477922404 100644 --- a/src/backend/executor/execTuples.c +++ b/src/backend/executor/execTuples.c @@ -549,6 +549,10 @@ tts_minimal_getsomeattrs(TupleTableSlot *slot, int natts) slot_deform_heap_tuple(slot, mslot->tuple, &mslot->off, natts); } +/* + * MinimalTupleTableSlots never provide system attributes. We generally + * shouldn't get here, but provide a user-friendly message if we do. + */ static Datum tts_minimal_getsysattr(TupleTableSlot *slot, int attnum, bool *isnull) { @@ -561,6 +565,11 @@ tts_minimal_getsysattr(TupleTableSlot *slot, int attnum, bool *isnull) return 0; /* silence compiler warnings */ } +/* + * Within MinimalTuple abstraction transaction information is unavailable. + * We generally shouldn't get here, but provide a user-friendly message if + * we do. + */ static bool tts_minimal_is_current_xact_tuple(TupleTableSlot *slot) {