I'm using PostgreSQL 11 latest version, having problems with an identity as PK that inherits a table.
assume you have simple parent table like:
CREATE TABLE test7
(
id_t7 int GENERATED always AS IDENTITY PRIMARY KEY,
folio int GENERATED always AS IDENTITY,
client int
);
with any inherited table like:
CREATE TABLE test7_detail1
(
-- uuid uuid DEFAULT uuid_generate_v4(), <-- fiddle doesn't support it
in_process boolean,
id_corte integer,
ts_captura timestamp(6) without time zone DEFAULT (now())::timestamp without time zone
) INHERITS (test7);
if I try insert like:
insert into test7_detail1 (client,in_process, id_corte)
values (20797,'t',101)
it returns:
ERROR: null value in column "id_t7" violates not-null constraint
DETAIL: Failing row contains (null, null, 20797, t, 101, 2019-05-03 22:27:54.823894).
here is the fiddle
what am i doing wrong?
is it a bug?