title: Postgres Sequence is generating negative values as primary keys
body: <p>I have a table which uses a sequence to auto-generate the Primary Key when inserting a record. However, the sequence is generating negative values. </p>
  
  <p>How do I enforce that only positive values are generated and is there a way to generated the ids randomly (especially a varchar type)</p>
  
  <h1>questionnaries.sql #</h1>
  
  <pre><code>CREATE TABLE public.questionnaries
  (
    id integer NOT NULL DEFAULT nextval('questionnaries_id_seq'::regclass),
    personname character varying(255) NOT NULL,
    question character varying(255) NOT NULL,
    response character varying(255) NOT NULL,
    CONSTRAINT questionnaries_pkey PRIMARY KEY (id)
  )
  WITH (
    OIDS=FALSE
  );
  ALTER TABLE public.questionnaries
    OWNER TO postgres;
  </code></pre>
  
  <h1>questionnaries_id_seq</h1>
  
  <pre><code>CREATE SEQUENCE public.questionnaries_id_seq
    INCREMENT 1
    MINVALUE 1
    MAXVALUE 9223372036854775807
    START 6
    CACHE 1;
  ALTER TABLE public.questionnaries_id_seq
    OWNER TO postgres;
  </code></pre>