title: PostgreSQL script error
body: <p>I am getting this error. Why?</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION factuurRegel()
  RETURNS TRIGGER AS 
  $$
  
  BEGIN
  INSERT INTO Factuur(factuurnr, factuurdatum, bestelnr)
  VALUES ((default to_char(CURRENT_DATE ,'yyyy') || '-' || new.bestelnr), CURRENT_DATE, new.bestelnr);
  RETURN NEW;
  END;
  $$
  LANGUAGE plpgsql;
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>    ERROR:  syntax error at or near "default"
  LINE 7: VALUES ((default to_char(CURRENT_DATE ,'yyyy') || '-' || new...
                   ^
  ********** Error **********
  
  ERROR: syntax error at or near "default"
  SQL state: 42601
  Character: 137
  </code></pre>