Re: Index AmInsert Parameter Confused?

Поиск
Список
Период
Сортировка
Искать
От
Matthias van de Meent
Тема
Re: Index AmInsert Parameter Confused?
Дата
Msg-id
CAEze2Wi2FO3ZZiMPPUYA8k7C=Rf9+Con3kK3h=yMPnZ_tv52JA@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Index AmInsert Parameter Confused? jacktby jacktby <jacktby@gmail.com>
Re: Index AmInsert Parameter Confused? Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Index AmInsert Parameter Confused? jacktby jacktby <jacktby@gmail.com>
Re: Index AmInsert Parameter Confused? Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Index AmInsert Parameter Confused? jacktby jacktby <jacktby@gmail.com>
On Tue, 26 Sept 2023 at 18:38, jacktby jacktby  wrote:
>
> typedef bool (*aminsert_function) (Relation indexRelation,
>   Datum *values,
>   bool *isnull,
>   ItemPointer heap_tid,
>   Relation heapRelation,
>   IndexUniqueCheck checkUnique,
>   bool indexUnchanged,
>   struct IndexInfo *indexInfo);
>
> Why is there a heap_tid, We haven’t inserted the value, so where does it from ?

Index insertion only happens after the TableAM tuple has been
inserted. As indexes refer to locations in the heap, this TID contains
the TID of the table tuple that contains the indexed values, so that
the index knows which tuple to refer to.

Note that access/amapi.h describes only index AM APIs; it does not
cover the table AM APIs descibed in access/tableam.h

Kind regards,

Matthias van de Meent


В списке pgsql-hackers по дате отправления
От: Heikki Linnakangas
Дата:
От: Jeff Davis
Дата:
FAQ