return setof : alternatives to holder table

From: zhong ming wu <mr(dot)z(dot)m(dot)wu(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: return setof : alternatives to holder table
Date: 2010-08-15 10:00:16
Message-ID: AANLkTi=6gyFv6XENTC_absPoMaWhPbeRUCOP2vMcibcb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2010-08-15 10:10:28 Re: return setof : alternatives to holder table
Previous Message Sim Zacks 2010-08-15 09:10:28 Re: undefined symbol: PQconnectdbParams