public inbox for [email protected]
help / color / mirror / Atom feedFrom: jacktby jacktby <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Re: Index AmInsert Parameter Confused?
Date: Wed, 27 Sep 2023 11:03:40 +0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAEze2Wi2FO3ZZiMPPUYA8k7C=Rf9+Con3kK3h=yMPnZ_tv52JA@mail.gmail.com>
References: <[email protected]>
<CAEze2Wi2FO3ZZiMPPUYA8k7C=Rf9+Con3kK3h=yMPnZ_tv52JA@mail.gmail.com>
> 2023年9月27日 00:45,Matthias van de Meent <[email protected]> 写道:
>
> On Tue, 26 Sept 2023 at 18:38, jacktby jacktby <[email protected]> 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
1.Thanks, so if we insert a tuple into a table which has a index on itself, pg will insert tuple into heap firstly, and the give the heaptid form heap to the Index am api right?
2. I’m trying to implement a new index, but I just need the data held in index table, I hope it’s not inserted into heap, because the all data I want can be in index table.
view thread (3+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Index AmInsert Parameter Confused?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox