title: What is wrong with the below PostgreSql insert function.. throwing error
body: <p>I have written a function in PostgreSQL which accepts two parameters viz varchar and int .
  The aim is to insert record</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION fnInsert(varchar,int) RETURNS void AS   
  'BEGIN
          Insert Into testtable(col1,col2) values ($1,$2)
  RETURN;
  END;'
  LANGUAGE plpgsql;
  </code></pre>
  
  <p>But while trying to compile it is throwing error</p>
  
  <pre><code>ERROR:  syntax error at or near "RETURN"
  LINE 4: RETURN;
          ^
  
  ********** Error **********
  
  ERROR: syntax error at or near "RETURN"
  SQL state: 42601
  Character: 173
  </code></pre>
  
  <p>If I take out the RETURN statement, I am getting the below error</p>
  
  <pre><code>ERROR:  syntax error at or near "END"
  LINE 4: END;'
          ^
  
  ********** Error **********
  
  ERROR: syntax error at or near "END"
  SQL state: 42601
  Character: 173
  </code></pre>
  
  <p>Please help me in identifying what is wrong here?</p>
  
  <p>Thanks</p>