Re: PL/pgSQL doesn't support variables in queries?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "J(dot)A(dot)" <postgresql(at)world-domination(dot)com(dot)au>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Erik Wienhold <ewie(at)ewie(dot)name>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: PL/pgSQL doesn't support variables in queries?
Date: 2023-05-03 14:40:19
Message-ID: CAKFQuwb0RzBn05SK3USj8nqn4Eds0qw9CRVqY4HZjmZyK7KDbg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)world-domination(dot)com(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2023-05-03 14:56:24 Re: PL/pgSQL doesn't support variables in queries?
Previous Message J.A. 2023-05-03 14:34:16 Re: PL/pgSQL doesn't support variables in queries?