Re: return setof and Temp tables

From: William Leite Araújo <william(dot)bh(at)gmail(dot)com>
To: "Justin B(dot) Kay" <jkay(at)2pattersons(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: return setof and Temp tables
Date: 2006-02-17 12:42:27
Message-ID: bc63ad820602170442u35477d9bl@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2006/2/17, Justin B. Kay <jkay(at)2pattersons(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-02-17 13:21:19 Re: Take advantage of PREPARE (Pool of Conections)
Previous Message Marcos 2006-02-17 12:24:02 Re: Take advantage of PREPARE (Pool of Conections)