Re: transition tables and UPDATE - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: transition tables and UPDATE
Date
Msg-id CA+hUKGLj+TOoSomQ0DGASO474W82ysbPUMz9PUOVKcWtP_dQ-w@mail.gmail.com
Whole thread Raw
In response to transition tables and UPDATE  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: transition tables and UPDATE
List pgsql-hackers
On Wed, Feb 1, 2023 at 10:18 PM Alvaro Herrera <alvherre@alvh.no-ip.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



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Exit walsender before confirming remote flush in logical replication
Next
From: "shiy.fnst@fujitsu.com"
Date:
Subject: RE: Time delayed LR (WAS Re: logical replication restrictions)