Suppressing SELECT output before \gexec? This answer is great for when I needed to reown 150 tables, each with 40 tables, but displays the 6000 rows from SELECT before running the 6000 ALTER statements.
Thus, as stated in the Subject, is there any way to suppress the SELECT output?
sides=&gt; SELECT format(
sides(&gt;   'ALTER TABLE %I.%I.%I OWNER TO sides_owner;',
sides(&gt;   table_catalog,
sides(&gt;   table_schema,
sides(&gt;   table_name
sides(&gt; )
sides-&gt; FROM information_schema.tables
sides-&gt; WHERE table_schema = 'strans';
                                       format                                        
---------------------------------------------------------------------
 ALTER TABLE sides.strans.foo OWNER TO sides_owner;
 ALTER TABLE sides.strans.blarg_p2020_02 OWNER TO sides_owner;
 ALTER TABLE sides.strans.blarg_p2020_03 OWNER TO sides_owner;
 ALTER TABLE sides.strans.blarg_p2020_04 OWNER TO sides_owner;
 ALTER TABLE sides.strans.blarg_error_p2019_01 OWNER TO sides_owner;
 etc
 etc
 etc
Thus, as stated in the Subject, is there any way to suppress the SELECT output?

Yes, by omitting the semi-colon after the SQL statement.
That is, \gexec itself ends the SQL statement.
test=&gt; select 'select 1' \gexec
 ?column? 
----------
        1
(1 row)