I have connected my ArcMap to my PostgreSQL db using the Create Enterprise Geodatabase tool in ArcMap. I have multiple feature classes and the relevant relationships between them loaded into the db correctly.
However, I am attempting to add a unique sequence to the feature classes using the postgres sequence function as below:
CREATE SEQUENCE my_sequence;
I then set the default for an integer colum in my tables and assign the sequence as below:
SET DEFAULT nextval('my_sequence');
However, the sequencer works perfectly if I insert data inside PostgreSQL using a SQL statement. If I edit the same table in ArcMap I get the following error when trying to save my edits:
ERROR: duplicate key value violates unique constraint DETAIL: Key(uniq_id)=(0)already exists
Where am I overlooking something?