Re: a misbehavior of partition row movement (?) - Mailing list pgsql-hackers

From Rahila Syed
Subject Re: a misbehavior of partition row movement (?)
Date
Msg-id CAH2L28tHrUn_J0+DDY1ba91QkAOfV7bb=RKekRN6naYroJXS6Q@mail.gmail.com
Whole thread Raw
In response to Re: a misbehavior of partition row movement (?)  (Amit Langote <amitlangote09@gmail.com>)
Responses Re: a misbehavior of partition row movement (?)
List pgsql-hackers
Hi Amit,



Here is an updated version of the patch with some cosmetic changes
from the previous version.  I moved the code being added to
AfterTriggerSaveEvent() and ExecUpdate() into separate subroutines to
improve readability, hopefully.

I tested these patches. It works as expected in case of cross partition updates, by correctly updating the
referencing table.  It works fine for ON UPDATE SET NULL and SET DEFAULT options as well. 
Also, tested by having a table reference only a partition and not the parent. In this case, the delete 
trigger is correctly called when the row is moved out of referenced partition. 

The partition-key-update-1.spec test fails with the following error message appearing in the diffs.

 step s1u3pc: UPDATE foo_range_parted SET a=11 WHERE a=7;
+ERROR:  cannot move row being updated to another partition

I think the documentation update is missing from the patches. 
 
Thank you,
Rahila Syed

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Allow batched insert during cross-partition updates
Next
From: Guillaume Lelarge
Date:
Subject: Re: Extensions not dumped when --schema is used