title: Error setval: value 0 is out of bounds for sequence "seq" (1..9223372036854775807)
body: <p>In the project I am working, we use PostgreSQL and when the c# code which runs the following statement: </p>
  
  <pre><code>INSERT INTO directory (id, reference, created) 
  VALUES (DEFAULT, DEFAULT, default) 
  RETURNING id, reference;
  </code></pre>
  
  <p>we got the following error:
      setval: value 0 is out of bounds for sequence "directory_seq" (1..9223372036854775807)</p>
  
  <p>What could be the reason? or what is a possible solution? thanks in advance</p>