Re: PL/pgSQL doesn't support variables in queries? - Mailing list pgsql-general

From David G. Johnston
Subject Re: PL/pgSQL doesn't support variables in queries?
Date
Msg-id CAKFQuwb0RzBn05SK3USj8nqn4Eds0qw9CRVqY4HZjmZyK7KDbg@mail.gmail.com
Whole thread Raw
In response to Re: PL/pgSQL doesn't support variables in queries?  ("J.A." <postgresql@world-domination.com.au>)
List pgsql-general
The convention on these lists is to inline or, at worse, bottom-post.

On Wed, May 3, 2023 at 7:34 AM J.A. <postgresql@world-domination.com.au> wrote:
now select * from a _number_ of tables and return a -multi recordsets- from this single query. I'm not sure if that is the same terminology, in pgsql?

So is this possible?

The output of a set-returning function (srf) is a single tabular result.

If you want to produce multiple tabular results you would need to either serialize them (say into jsonb) or assign a cursor name to each and then reference them by name.

David J.

pgsql-general by date:

Previous
From: "J.A."
Date:
Subject: Re: PL/pgSQL doesn't support variables in queries?
Next
From: Adrian Klaver
Date:
Subject: Re: PL/pgSQL doesn't support variables in queries?