title: postgresql function returns multiple columns
body: <p>I am confused about the passing process of the parameter from functions created in Postgres:</p>
  
  <pre><code>create type IncorrectRecord as (pattern_number integer, uoc_number integer);
  
  create or replace function text1(pattern text, uoc_threshold integer) 
      returns  setof IncorrectRecord
  as $$
  begin
  return next count(v1.code) as pattern_number, count(v2.code) as uoc_number
  from (select * from q1_1 where code like pattern) as v1, (select
   * from q1_1 where code like pattern and uoc &gt; uoc_threshold) as v2;
  return;
  end
  $$ language plpgsql;
  </code></pre>
  
  <p>I have modified some, there is no parameters errors but it still does not work.
  when I tested it with </p>
  
  <pre><code>select * 
  from test1('ECO%', 8)
  </code></pre>
  
  <blockquote>
    <p>error:  function returns two columns. </p>
  </blockquote>
  
  <p>Is there any thing wrong with the type? How can I fix it?.</p>