when construct new tuple for update?

Started by mohsen soodkhah mohammadiover 12 years ago2 messages
#1mohsen soodkhah mohammadi
mohsensoodkhah@gmail.com

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.
can you help me?

#2Amit Kapila
amit.kapila16@gmail.com
In reply to: mohsen soodkhah mohammadi (#1)
Re: when construct new tuple for update?

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

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers