return setof : alternatives to holder table - Mailing list pgsql-general

From zhong ming wu
Subject return setof : alternatives to holder table
Date
Msg-id AANLkTi=6gyFv6XENTC_absPoMaWhPbeRUCOP2vMcibcb@mail.gmail.com
Whole thread Raw
Responses Re: return setof : alternatives to holder table  (Craig Ringer <craig@postnewspapers.com.au>)
Re: return setof : alternatives to holder table  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-general
Hello List,

I have a plpgsql function returning a set of records.  The record is
effectively a join of some tables.

For example, table a (column a1,column a2,column a3,column a4)

table b(column b1,column b2,column b4)

I am returning a set of (a2,a4,b2). What I do now is to create a empty table

foo(column a2,column a4,column b2)

then in my function I have

record r foo%rowtype

I'm not happy with this solution because this foo tables has to be kept around

Thanks for any better solution to this

mr.wu

pgsql-general by date:

Previous
From: Sim Zacks
Date:
Subject: Re: undefined symbol: PQconnectdbParams
Next
From: Craig Ringer
Date:
Subject: Re: return setof : alternatives to holder table