psql -af > out, is possible to also have raise notice, raise info part. - Mailing list pgsql-general

From jian he
Subject psql -af > out, is possible to also have raise notice, raise info part.
Date
Msg-id CACJufxFhzBCAikuQOStLt0VXLFEWJd4bgxzHvv7dVu-tOA+QZg@mail.gmail.com
Whole thread Raw
Responses Re: psql -af > out, is possible to also have raise notice, raise info part.
List pgsql-general
hi.

test.sql content:
--------------------------------------------------------------------------------------------------
do $$
begin
  raise info 'information message %', now() ;
  raise debug 'debug message %', now();
  raise notice 'notice message %', now();
end $$;
--------------------------------------------------------------------------------------------------
psql -af test.sql > test.out

current result:
--------------------------------------------------------------------------------------------------
do $$
begin
  raise info 'information message %', now() ;
  raise notice 'notice message %', now();
end $$;
DO
--------------------------------------------------------------------------------------------------
expected result in test.out

do $$
begin
  raise info 'information message %', now() ;
  raise notice 'notice message %', now();
end $$;
INFO:  information message 2023-07-12 11:49:27.894126+08
NOTICE:  notice message 2023-07-12 11:49:27.894126+08
DO



pgsql-general by date:

Previous
From: Benedict Holland
Date:
Subject: Re: Need Help On Upgrade
Next
From: "David G. Johnston"
Date:
Subject: Re: psql -af > out, is possible to also have raise notice, raise info part.