title: What is the acceptable method for generating an auto incrementing primary key in PostgreSQL?
body: <p>Is there no easy way to do this without sequences and triggers? I have average SQL skills, and I want to use the industry standard method for pl/sql (PostgreSQL). I'm basically converting over this example table from Spring Security:</p>
  
  <pre><code>create table group_members (
      id bigint generated by default as identity(start with 0) primary key,
      username varchar(50) not null,
      group_id bigint not null,
      constraint fk_group_members_group foreign key(group_id) references groups(id));
  </code></pre>
  
  <p>What I have so far:</p>
  
  <pre><code>CREATE TABLE auth_group_members (
      id NUMBER,
      username VARCHAR(50) NOT NULL,
      group_id NUMBER NOT NULL,
      CONSTRAINT "FK_AuthGroupMembers" FOREIGN KEY(group_id) REFERENCES auth_groups(id)
  );
  </code></pre>