Re: transition tables and UPDATE

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: transition tables and UPDATE
Date: 2023-02-01 09:29:59
Message-ID: CA+hUKGLj+TOoSomQ0DGASO474W82ysbPUMz9PUOVKcWtP_dQ-w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 1, 2023 at 10:18 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> Earlier today I gave a talk about MERGE and wanted to provide an example
> with FOR EACH STATEMENT triggers using transition tables. However, I
> can't find a non-ugly way to obtain the NEW row that corresponds to each
> OLD row ... I had to resort to an ugly trick with OFFSET n LIMIT 1.
> Can anyone suggest anything better? I couldn't find any guidance in the
> docs.

I don't know the answer, either in PostgreSQL or the SQL spec. I
wondered if there *should* be a way here:

https://www.postgresql.org/message-id/CAEepm=1ncxBNna-pXGr2hnMHRyYi_6_AwG_352-Jn=mwdFdAGw@mail.gmail.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shiy.fnst@fujitsu.com 2023-02-01 09:40:41 RE: Time delayed LR (WAS Re: logical replication restrictions)
Previous Message Amit Kapila 2023-02-01 09:28:14 Re: Exit walsender before confirming remote flush in logical replication