Re: PG 18 release notes draft committed
От | jian he |
---|---|
Тема | Re: PG 18 release notes draft committed |
Дата | |
Msg-id | CACJufxFM1avdwu=OrTx_uMAjTDbFOj1Gp7mnNHOofTVj9QtmRw@mail.gmail.com обсуждение исходный текст |
Ответ на | PG 18 release notes draft committed (Bruce Momjian <bruce@momjian.us>) |
Ответы |
Re: PG 18 release notes draft committed
|
Список | pgsql-hackers |
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.
В списке pgsql-hackers по дате отправления: