Re: when construct new tuple for update? - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: when construct new tuple for update?
Date
Msg-id CAA4eK1L-K-3Dz_v=u6WaJmvMDxDQh-_2YMAFme1zVE9UWABaxg@mail.gmail.com
Whole thread Raw
In response to when construct new tuple for update?  (mohsen soodkhah mohammadi <mohsensoodkhah@gmail.com>)
List pgsql-hackers
On Wed, Sep 18, 2013 at 2:21 PM, mohsen soodkhah mohammadi
<mohsensoodkhah@gmail.com> wrote:
> hi
> I want that find where did a new tuple data construct in postgresql code
> when query is update.
> I find that ExecModiryTable is an upper function for do it. but I want to
> find exact place that create the data of one row of table.

heap_form_tuple() construct a new tuple from the given values[] and
isnull[] arrays and incase of UPDATE operation, it gets called in
below call stack
ExecModifyTable()->ExecUpdate()->ExecMaterializeSlot()->ExecCopySlotTuple()->heap_form_tuple()

Values to construct new tuple are formed during projection in
ExecProject() which is called as below call stack in UPDATE operation:
ExecModifyTable()->ExecProcNode()->ExecSeqScan()->ExecScan()->ExecProject()


With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: record identical operator
Next
From: Fujii Masao
Date:
Subject: Re: logical changeset generation v6