| From: | Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> | 
|---|---|
| To: | pgsql-general(at)postgresql(dot)org | 
| Cc: | "Justin B(dot) Kay" <jkay(at)2pattersons(dot)com> | 
| Subject: | Re: return setof and Temp tables | 
| Date: | 2006-02-17 21:31:08 | 
| Message-ID: | 200602171631.08197.xzilla@users.sourceforge.net | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
On Friday 17 February 2006 00:13, Justin B. Kay wrote:
> 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?  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.
> If this is not possible, is there some alternative way to do this?  I am
> trying to translate what was done in a ms sql database.
>
If I were doing this, I would create a seperate permanent type that's 
structure matched that of the temp table, or use out parameters to mimic it. 
-- 
Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2006-02-17 21:38:35 | Re: Converting an ASCII database to an UTF-8 database | 
| Previous Message | mmaclennan | 2006-02-17 21:26:08 | Re: connecting to pgsql |