Re: PG 18 release notes draft committed

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: PG 18 release notes draft committed
Date: 2025-05-08 07:45:00
Message-ID: CACJufxFM1avdwu=OrTx_uMAjTDbFOj1Gp7mnNHOofTVj9QtmRw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 2, 2025 at 10:44 AM Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>
> release-18: 209
>
> I will continue improving it until beta 1, and until the final release.
> I will probably add markup in 1-3 weeks. Let the feedback begin. ;-)
>
> You can see the most current HTML-built version here:
>
> https://momjian.us/pgsql_docs/release-18.html
>

hi.

Add OLD/NEW support to RETURNING in DML queries (Dean Rasheed) §

Previously RETURNING only returned new values for INSERT and UPDATE, old values
for DELETE; MERGE would return the appropriate value for the internal query
executed. This new syntax allows INSERT with an ON CONFLICT action to return old
values, UPDATE to return old values, and DELETE to return new values if the
query assigned to an ON DELETE row would return new values. New syntax allows
changeable relation aliases "old" and "new" to specify which values should be
returned.
--------------------------------------------------------
I am not sure I understand the last sentence, especially "changeable
relation aliases".
looking at the commit message, the following is what i come up with:

Previously RETURNING only returned new values for INSERT and UPDATE, old values
for DELETE; MERGE would return the appropriate value for the internal query
executed. This allows the RETURNING list of INSERT/UPDATE/DELETE/MERGE queries
to explicitly return old and new values by using the special aliases "old" and
"new". There are no restrictions on the use of "old" and "new" in any DML
queries.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yasir 2025-05-08 08:04:57 Valgrind - showing memory leaks?
Previous Message Michael Paquier 2025-05-08 07:36:40 Re: Remove unnecessary "lmgr.h" in stat_utils.c