postgresqlnavicat

Setting auto increment id in Postgres with Navicat


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?


Solution

  • 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)