Re: PG 18 release notes draft committed - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: PG 18 release notes draft committed
Date
Msg-id aBzKS9tUJwo9k19u@momjian.us
Whole thread Raw
In response to Re: PG 18 release notes draft committed  (jian he <jian.universality@gmail.com>)
List pgsql-hackers
On Thu, May  8, 2025 at 03:45:00PM +0800, jian he wrote:
> On Fri, May 2, 2025 at 10:44 AM Bruce Momjian <bruce@momjian.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.

Yes, I like your new text better than mine.  I retained "This new
syntax" so "This" is clear, and adjusted the last sentence to connect
the alias with the ability to rename to avoid conflicts.  Applied patch
attached.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.

Attachment

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: disabled SSL log_like tests
Next
From: Bruce Momjian
Date:
Subject: Re: PG 18 release notes draft committed