Setting auto increment id in Postgres with Navicat

Nick Parsons picture Nick Parsons · Dec 1, 2014 · Viewed 7.6k times · Source

I'm rather new to Postgres and Navicat is the only fully functional GUI that I've come across. That said, I'm trying to implement a simple auto increment for an id. Navicat doesn't seem to support bigserial or serial, or have anything in place to specify a primary key w/ auto increment. Any thoughts?

Answer

hzandi picture hzandi · Feb 2, 2017

you should make a sequence default value

Navicat Menu -> Others -> Sequence -> (choose table and column) -> save "user_id_plus1"

and set default value for id column with

nextval('user_id_plus1'::regclass)