Return a "results set", use a temporary table or use a table? - Mailing list pgsql-general

From Hadley Willan
Subject Return a "results set", use a temporary table or use a table?
Date
Msg-id 1035329274.2056.72.camel@orac.area51.deeper.co.nz
Whole thread Raw
Responses Re: Return a "results set", use a temporary table or use a table?  (Neil Conway <neilc@samurai.com>)
List pgsql-general
Hi. I've got three functions A,B and C.
C is designed that it can be used by both A and B and recieves it's
parameters accordingly.

However, my question is, what is the best way I can use to operate on
the results that are generated by C.  What I mean is A or B will call
into C and, C will generate a "results set" that A or B need to use.

Therefore, should C be returning that results set? (how? just point me
to docs somewhere as I can't return a RECORD and a ROWTYPE only has a
single row
Or should C be creating a temporary table for A or B to use? Can
postgres do that?
Or should I create a table called X that I stuff the results from C
into, operate on with A or B then have A or B delete all records from?

I saw an example from someone earlier that returned a "setof", but I
can't seem to find that in the docs or a list of valid RETURN types for
functions?

Thank You.
      Hadley

--
Hadley Willan > Systems Development > Deeper Design Limited.
hadley@deeper.co.nz > www.deeperdesign.com > +64 (21) 28 41 463



pgsql-general by date:

Previous
From: Paulo Henrique Baptista de Oliveira
Date:
Subject: Re: PostgreSQL for Windows 2000
Next
From: Bruce Momjian
Date:
Subject: Re: PostgreSQL for Windows 2000