Re: inconsistent behavior with "GENERATED BY DEFAULT AS IDENTITY"

2021-08-29 Thread Himanshu Upadhyaya
ok, understood. Thanks Tom. Regards, Himanshu On Sun, Aug 29, 2021 at 7:10 PM Tom Lane wrote: > Himanshu Upadhyaya writes: > > IMHO below query should replace "NULL" value for ID column with the > > GENERATED IDENTITY value (should insert 1,10 for ID and ID1 respectively > in > > below's

Re: inconsistent behavior with "GENERATED BY DEFAULT AS IDENTITY"

2021-08-29 Thread Tom Lane
Himanshu Upadhyaya writes: > IMHO below query should replace "NULL" value for ID column with the > GENERATED IDENTITY value (should insert 1,10 for ID and ID1 respectively in > below's example), similar to what we expect when we have DEFAULT constraint > on the column. Why? Ordinary DEFAULT

inconsistent behavior with "GENERATED BY DEFAULT AS IDENTITY"

2021-08-29 Thread Himanshu Upadhyaya
Hi, It seems we have inconsistent behavior with the implementation of "GENERATED BY DEFAULT AS IDENTITY" constraint on a table column. Here we are not allowing(internally not replacing NULL with IDENTITY DEFAULT) the "NULL" insertion into the table column. postgres=# CREATE TABLE TEST_TBL_1(ID