SELECT nextval(pg_get_serial_sequence('team_id', 'team_internal_id')) query not working in embedded postgres
MohakWadhwani opened this issue · 0 comments
MohakWadhwani commented
When below query is executed getting the mentioned issue
"INSERT INTO team_id(team_internal_id) "+
"SELECT nextval(pg_get_serial_sequence('team_id', 'team_internal_id')))"
org.postgresql.util.PSQLException: ERROR: null value in column "team_internal_id" violates not-null constraint
Detail: Failing row contains (null).
When independently executing
SELECT nextval(pg_get_serial_sequence('team_id', 'team_internal_id')))
its working