Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1Ul8-0002Fw-N1 for pgsql-general@arkaria.postgresql.org; Thu, 08 Jul 2021 14:12:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m1Ul6-0008Ho-Mn for pgsql-general@arkaria.postgresql.org; Thu, 08 Jul 2021 14:12:08 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1Ul6-0008HN-De for pgsql-general@lists.postgresql.org; Thu, 08 Jul 2021 14:12:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1Ul3-0006Jp-Nd for pgsql-general@lists.postgresql.org; Thu, 08 Jul 2021 14:12:07 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 168EC4Di1959878; Thu, 8 Jul 2021 10:12:04 -0400 From: Tom Lane To: zickzack@quantentunnel.de cc: pgsql-general@lists.postgresql.org Subject: Re: Insert/Dump/Restore table with generated columns In-reply-to: References: Comments: In-reply-to zickzack@quantentunnel.de message dated "Thu, 08 Jul 2021 16:01:25 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1959876.1625753524.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 08 Jul 2021 10:12:04 -0400 Message-ID: <1959877.1625753524@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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=3Dpostgresql.git&a=3Dcommitdiff&h=3D1= 7958972f regards, tom lane