insert new row into table with identity column in postgresql 10 and 11

Answered

it doesn't seem possible to use the UI to create a new row in a table that contains a field defined as:

servicer_user_id INTEGER GENERATED ALWAYS AS IDENTITY
PRIMARY KEY,

it always specifies <null> for servicer_user_id, which will obviously fail. further, generating the DDL for the table from within datagrip yields this, which is wrong:

create table if not exists servicer.servicer_user
(
servicer_user_id integer not null
constraint servicer_user_pkey
primary key,
type servicer.user_type not null,
email varchar(512) not null
constraint servicer_user_email_key
unique,
super_user boolean default false not null,
disabled boolean default false not null,
servicer_user_uuid uuid default gen_random_uuid() not null
constraint servicer_user_uuid_key
unique,
first_name text,
last_name text
);

does datagrip just not support identity columns?

2 comments
Comment actions Permalink

 

in order to be more clear about what im trying to do. i click the "plus" icon, then fill out the fields, then submit:

0

Please sign in to leave a comment.