title: org.postgresql.util.PSQLException: ERROR: null value in column "order_id" violates not-null constraint
body: <p>I have created a stored procedure in postgresql as follows:</p>
  
  <pre><code> INSERT INTO ABC
  
       (order_id,order_dt, customer_id, route_id, routenum, ordertype, create_station_id, create_stationtype, create_time,create_user_id,tran_time, tran_user_id,station_id)
  
     values 
  
       (1,$1, $2, $3, $4, $5, $6, $7, LOCALTIMESTAMP, $8, 
  
      default, default,$9) 
  
     returning  order_id;
  </code></pre>
  
  <p>There <code>order_id</code> is type of <code>SERIAL</code> -> <code>primary key</code></p>
  
  <p>I am getting error while insertion as follows:</p>
  
  <pre><code>PSQLException: ERROR: null value in column "order_id" violates not-null constraint Where: SQL function "insert_ABC" statement 1.
  </code></pre>
  
  <p>I am using <code>PostgreSQL 8.2</code>. It is in a hosting space I am doing this.</p>
  
  <p>I know error occurs because the default type takes null as default.</p>
  
  <p>What is the equivalent of <code>default</code> of type <code>SERIAL</code>.</p>
  
  <p>Please guide me.</p>