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 1lXmgF-0002je-BW for pgsql-bugs@arkaria.postgresql.org; Sat, 17 Apr 2021 15:16:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lXmgD-0002cB-V9 for pgsql-bugs@arkaria.postgresql.org; Sat, 17 Apr 2021 15:16:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lXmgD-0002c4-PR for pgsql-bugs@lists.postgresql.org; Sat, 17 Apr 2021 15:16:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lXmg9-0007uw-9R for pgsql-bugs@lists.postgresql.org; Sat, 17 Apr 2021 15:16:17 +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 13HFGBW1256835; Sat, 17 Apr 2021 11:16:11 -0400 From: Tom Lane To: n5jgvx4@nate.sh cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16969: INSERT of multiple rows into GENERATED ALWAYS AS IDENTITY column with DEFAULT value is broken. In-reply-to: <16969-e14b6d95e35f939c@postgresql.org> References: <16969-e14b6d95e35f939c@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Sat, 17 Apr 2021 11:18:38 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <256833.1618672571.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 17 Apr 2021 11:16:11 -0400 Message-ID: <256834.1618672571@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > -- insert more than one row with "id" set to DEFAULT; > -- result: unexpected and undocumented failure with the following error: > -- ERROR: cannot insert into column "id" > -- DETAIL: Column "id" is an identity column defined as GENERATED > ALWAYS. > -- HINT: Use OVERRIDING SYSTEM VALUE to override. > INSERT INTO test (id, name) VALUES (DEFAULT, 'Adam'), (DEFAULT, 'Eve'); Yeah, this is a known deficiency. It's fixed for v14, but the fix was deemed too invasive to risk back-patching [1]. regards, tom lane [1] https://git.postgresql.org/gitweb/?p=3Dpostgresql.git&a=3Dcommitdiff&h= =3D17958972f