I have a postgres function which is returning table :
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;
This function is not returning data in row and colunm form instead it returns data as : "(0,0)" , that is causing a problem in coldfusion cfquery block in extracting data , Can I have way by which I am able to get data in row and column when a table is returned from function of postgresql. or I mean to say why postgres function that returns a table not returning data as columns ? Please help me in this , I am new to postres. Thanks In Advance.