From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | jian he <jian(dot)universality(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: PG 18 release notes draft committed |
Date: | 2025-05-08 15:14:19 |
Message-ID: | aBzKS9tUJwo9k19u@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(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.
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(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com
Do not let urgent matters crowd out time for investment in the future.
Attachment | Content-Type | Size |
---|---|---|
master.diff | text/x-diff | 1.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2025-05-08 15:18:11 | Re: PG 18 release notes draft committed |
Previous Message | Daniel Gustafsson | 2025-05-08 15:05:20 | Re: disabled SSL log_like tests |