Re: System column support for partitioned tables using heap

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Morris de Oryx <morrisdeoryx(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: System column support for partitioned tables using heap
Date: 2022-07-21 20:32:38
Message-ID: CA+TgmoZeOruj626Dmvj5O1o6SEU6UM5igJFHSF6PkDtiE+7h3A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 19, 2022 at 11:22 PM Morris de Oryx <morrisdeoryx(at)gmail(dot)com> wrote:
> It might help if I show a sample insert handling function. The issue is with the line at the end of the top CTE, insert_rows:
>
> returning xmax as inserted_transaction_id),
>
> That's what fails on partitions. Is there an alternative way to test what happened to the row(s)? here's the full function. . I wrote a code generator, so I don't have to hand-code all of these bits for each table+version:

Oh I see. I didn't realize you were using INSERT .. ON CONFLICT
UPDATE, but that makes tons of sense, and I don't see an obvious
alternative to the way you wrote this.

Hmm.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-07-21 21:44:11 Re: Fwd: Unprivileged user can induce crash by using an SUSET param in PGOPTIONS
Previous Message David G. Johnston 2022-07-21 20:20:01 Undocumented Order By vs Target List Volatile Function Behavior