Return Next and Return Query

From: "Wappler, Robert" <rwappler(at)ophardt(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Return Next and Return Query
Date: 2009-12-23 12:47:37
Message-ID: C8E2DAF0E663A948840B04023E0DE32A0241E0DB@w2k3server02.de.ophardt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I'm not quite sure, what's the difference between RETURN NEXT and RETURN
QUERY.

From the documentation (Sec. 38.6) RETURN NEXT returns a table and in my
understanding with each execution a different table.

RETURN QUERY appends a result set of a query to the function's result
set, i.e. the function returns at most one table.

Where is the difference for the caller? That means: how to determine if
one or several tables have been returned?

The result of the function is always of type TABLE/SETOF RECORD.

--

Regards,

Robert...

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2009-12-23 13:09:29 Re: Return Next and Return Query
Previous Message Phoenix Kiula 2009-12-23 11:24:07 Re: Not finding RPMs for 8.4.2!