Re: Insert/Dump/Restore table with generated columns - Mailing list pgsql-general

From Tom Lane
Subject Re: Insert/Dump/Restore table with generated columns
Date
Msg-id 1959877.1625753524@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: Insert/Dump/Restore table with generated columns  (zickzack@quantentunnel.de)
List pgsql-general
zickzack@quantentunnel.de writes:
> After you're answer I did a few investigations. If I insert data with a single insert, everything is working like
expected
> INSERT INTO public.ab VALUES (1, DEFAULT);
> this changes if I do multiple inserts in one statement:
> INSERT INTO public.ab VALUES (1, DEFAULT), (2, DEFAULT);
> ERROR:  cannot insert into column "b"
> DETAIL:  Column "b" is a generated column.

> Is this a bug or a feature?

It's a deficiency :-(.  It's fixed for v14 but the fix seemed too invasive
to back-patch.

https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=17958972f

            regards, tom lane



pgsql-general by date:

Previous
From: zickzack@quantentunnel.de
Date:
Subject: Re: Re: Insert/Dump/Restore table with generated columns
Next
From: Wiwwo Staff
Date:
Subject: Re: On partitioning, PKs and FKs