title: Postgres function returning table not returning data in columns
body: <p>I have a Postgres function which is returning a table:</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION testFunction() RETURNS TABLE(a int, b int) AS
  $BODY$
  DECLARE a int DEFAULT 0;
  DECLARE b int DEFAULT 0;
  BEGIN
  CREATE TABLE tempTable AS SELECT a, b;
  RETURN QUERY SELECT * FROM tempTable; 
  DROP TABLE tempTable;
  END;
  $BODY$
  LANGUAGE plpgsql;
  </code></pre>
  
  <p>This function is not returning data in row and column form. Instead it returns data as:</p>
  
  <pre><code>(0,0)
  </code></pre>
  
  <p>That is causing a problem in Coldfusion cfquery block in extracting data. How do I get data in rows and columns when a table is returned from this function? In other words: Why does the PL/pgSQL function not return data as columns?</p>