Re: BUG #16969: INSERT of multiple rows into GENERATED ALWAYS AS IDENTITY column with DEFAULT value is broken.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: n5jgvx4(at)nate(dot)sh
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16969: INSERT of multiple rows into GENERATED ALWAYS AS IDENTITY column with DEFAULT value is broken.
Date: 2021-04-17 15:16:11
Message-ID: 256834.1618672571@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> 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=postgresql.git&a=commitdiff&h=17958972f

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Valentin Gatien-Baron 2021-04-18 14:53:36 websearch_to_tsquery() returns queries that don't match to_tsvector()
Previous Message Tom Lane 2021-04-17 15:09:53 Re: function to_char