On 2019-12-10 17:53, Tom Lane wrote:
However, a multi-row insert like the following:
insert into test (id, data)
values
(default,1),
(default,2);
fails with:
ERROR: cannot insert into column "id"
Detail: Column "id" is an identity column defined as GENERATED AL
Thomas Kellerer writes:
> assume the following table:
> create table test
> (
> id integer not null generated always as identity,
> data integer not null
> );
> The following insert works fine:
> insert into test (id, data)
> values (default,1);
> However, a mult
On 12/10/19 12:15 AM, Thomas Kellerer wrote:
Patrick FICHE schrieb am 10.12.2019 um 08:56:
-Original Message-
From: Thomas Kellerer
assume the following table:
create table test
(
id integer not null generated always as identity,
data integer not null
);
Patrick FICHE schrieb am 10.12.2019 um 08:56:
>> -Original Message-
>> From: Thomas Kellerer
>>
>> assume the following table:
>>
>> create table test
>> (
>> id integer not null generated always as identity,
>> data integer not null
>> );
>>
>> However, a mu
Hi Thomas,
I agree that it does not seem very consistent.
But is there any specific reason why are you using DEFAULT ?
Why don't you simply execute :
insert into test (data)
values
(1),
(2);
If you want / have to specify DEFAULT, then you should probably create your
identity