Re: - Mailing list pgsql-general

From Laurenz Albe
Subject Re:
Date
Msg-id 15be52da1fd694e224b803743b43046f489bfaab.camel@cybertec.at
Whole thread Raw
In response to  (Ron Johnson <ronljohnsonjr@gmail.com>)
List pgsql-general
On Thu, 2024-01-25 at 12:18 -0500, Ron Johnson wrote:
> PG 14.10 (and 9.6.24, which we're migrating off of).
>
> EXPLAIN SELECT works inside a FOR loop, but only the first line of the EXPLAIN
> output is stored.  What's the magic sauce for seeing the whole EXPLAIN output?

DECLARE
   _v_explain jsonb;
BEGIN
   EXECUTE 'EXPLAIN (FORMAT JSON) select ...' INTO _v_explain;
   RAISE NOTICE '%', _v_explain;
END;

Yours,
Laurenz Albe



pgsql-general by date:

Previous
From: Jawala
Date:
Subject: Feature Request: log_line_prefix %h Counterpart
Next
From: pf@pfortin.com
Date:
Subject: Re: permission denied on socket