title: plpgsql function returns table(..)
body: <p>I'm trying to get this plpgsql function to work:</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION outofdate(actualdate varchar) 
  RETURNS TABLE(designacion varchar(255),timebeingrotten varchar(255))
  AS $BODY$
  
   SELECT designacao, actualdate - prazo
   FROM alimento
   WHERE prazo &lt; actualdate;
  $BODY$ 
  LANGUAGE 'plpgsql' volatile;
  
  SELECT *
  From outofdate('12/12/2012');
  </code></pre>
  
  <p>It keeps giving me an error on line 2 - table ..</p>
  
  <blockquote>
    <p>ERROR:  syntax error at or near
    "TABLE" LINE 2: RETURNS
    TABLE(designacion
    varchar(255),timebeingrotten varch...
                    ^</p>
    
    <p><em><strong></em>***<em></strong> Error <strong></em>**<em>*</em></strong></p>
    
    <p>ERROR: syntax error at or near "TABLE"
    SQL state: 42601 Character: 67</p>
  </blockquote>