PostgreSQL's auto increment > serial
use serial
official
PostgreSQL: Documentation: 9.4: Numeric Types
unofficial
CREATE TABLE table_names ( id serial, name text, PRIMARY KEY(id) ); INSERT INTO table_names (name) VALUES ('taro'); INSERT INTO table_names (name) VALUES ('jiro'); SELECT * FROM table_names; id | name ----+------ 1 | taro 2 | jiro