Re: when construct new tuple for update?

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: mohsen soodkhah mohammadi <mohsensoodkhah(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: when construct new tuple for update?
Date: 2013-09-19 04:52:58
Message-ID: CAA4eK1L-K-3Dz_v=u6WaJmvMDxDQh-_2YMAFme1zVE9UWABaxg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 18, 2013 at 2:21 PM, mohsen soodkhah mohammadi
<mohsensoodkhah(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2013-09-19 05:08:36 Re: logical changeset generation v6
Previous Message Kevin Grittner 2013-09-19 03:48:56 Re: record identical operator