title: Using %rowtype when returning in a PostgreSQL function
body: <p>If I have a function that returns only one row with some columns from a table do I need to add <code>%rowtype</code> in the function return declaration?</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION test(int n)
  RETURNS tableName%rowtype AS
  $BODY$
  DECLARE 
      r tableName%rowtype;    
  BEGIN   
          select a,b,c into r from tableName where d=n;
          return r;
  $BODY$
  END;
  </code></pre>