Re: Add support for data change delta tables

From: Thomas Kellerer <shammat(at)gmx(dot)net>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Add support for data change delta tables
Date: 2024-01-15 10:44:59
Message-ID: 60e814a5-72fc-453f-a345-7d840e3c204c@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

PavelTurk schrieb am 15.01.2024 um 11:00:
> Currently PostgreSQL doesn't support data change delta tables. For example, it doesn't support this type of query:
>
> SELECT * FROM NEW TABLE (
>     INSERT INTO phone_book
>     VALUES ( 'Peter Doe', '555-2323' )
> ) AS t
>
> PostgreSQL has RETURNING that provides only a subset of this functionality.
>
> So I suggest to add support for data change delta tables. Because this feature is more powerful and it is included
> in the SQL Standard.

I don't know that syntax, but it seems to me, it's basically this:

with t as (
INSERT INTO phone_book
VALUES ( 'Peter Doe', '555-2323' )
returning *
)
select *
from t;


In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Czajkowski Łukasz 2024-01-15 11:25:59 Postgres authorization ad groups
Previous Message Pavel Stehule 2024-01-15 10:40:34 Re: Add support for data change delta tables