Re: return setof and Temp tables - Mailing list pgsql-general

From William Leite Araújo
Subject Re: return setof and Temp tables
Date
Msg-id bc63ad820602170442u35477d9bl@mail.gmail.com
Whole thread Raw
In response to return setof and Temp tables  ("Justin B. Kay" <jkay@2pattersons.com>)
List pgsql-general
2006/2/17, Justin B. Kay <jkay@2pattersons.com>:

I have looked around and found that you can use return setof in a function to return a result set, but can you use a temp table as the setof target? 

      Yes, you can ( PostgreSQL 8.0.6 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.5 (Debian 1:3.3.5-13))!

I build a temp table using various select statements and then try to return the result as a recordset.  I get an error: type t1 does not exist.


     Please, send the sample. I test "Create temp table AS SELECT * FROM <setof function>" and works on 8.0.6

--
William Leite Araújo

pgsql-general by date:

Previous
From: David Goodenough
Date:
Subject: Implicit conversion from string to timestamp
Next
From: Marcos
Date:
Subject: Take advantage of PREPARE (Pool of Conections)