Re: ON CONFLICT DO UPDATE for partitioned tables
Amit Langote <langote_amit_f8@lab.ntt.co.jp>
From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Pavan Deolasee <pavan.deolasee@gmail.com>,
Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>,
Andres Freund <andres@anarazel.de>,
Pg Hackers <pgsql-hackers@postgresql.org>,
Peter Geoghegan <pg@bowt.ie>
Date: 2018-04-18T04:13:38Z
Lists: pgsql-hackers
On 2018/04/18 0:02, Alvaro Herrera wrote: > Amit Langote wrote: > >> Attached find a patch that does that. When working on this, I noticed >> that when recursing for inheritance children, ATPrepAlterColumnType() >> would use a AlterTableCmd (cmd) that's already scribbled on as if it were >> the original. > > While I agree that the code here is in poor style, there is no live bug > here, because the only thing that is changed each time is the copy's > cmd->def, and its value is not obtained from the scribbled 'cmd' -- it's > obtained from the passed-in cmd->def, which is unmodified. Ah, you're right. The original cmd->def itself remains intact. Thanks, Amit
Commits
-
Remove quick path in ExecInitPartitionInfo for equal tupdescs
- 79b2e52615fa 11.0 landed
-
Ignore whole-rows in INSERT/CONFLICT with partitioned tables
- 158b7bc6d779 11.0 landed
-
Handle INSERT .. ON CONFLICT with partitioned tables
- 555ee77a9668 11.0 landed
-
Remove unnecessary members from ModifyTableState and ExecInsert
- ee0a1fc84eb2 11.0 landed