Re: Redirect RAISE NOTICE and errors to separate log file - Mailing list pgsql-admin

From David G. Johnston
Subject Re: Redirect RAISE NOTICE and errors to separate log file
Date
Msg-id CAKFQuwYrx9dT_MJYUgOD20ELHE_U18xZwkkFbtzBiSW9ESUNng@mail.gmail.com
Whole thread Raw
In response to Re: Redirect RAISE NOTICE and errors to separate log file  (Nikhil Ingale <niks.bgm@gmail.com>)
Responses Re: Redirect RAISE NOTICE and errors to separate log file  (Nikhil Ingale <niks.bgm@gmail.com>)
List pgsql-admin
On Fri, Feb 17, 2023 at 9:52 AM Nikhil Ingale <niks.bgm@gmail.com> wrote:
I need the non query output in the user defined log file.
How can I achieve that?

Learn shell scripting.

At its simplest, have the user replace "/dev/null" in my example with whatever path they want.

psql doesn't expose specifying a non-query output channel so you are forced to deal with this in a higher/wrapper layer where you can manipulate stderr.

David J.


pgsql-admin by date:

Previous
From: Nikhil Ingale
Date:
Subject: Re: Redirect RAISE NOTICE and errors to separate log file
Next
From: pradeep pandey
Date:
Subject: Re: EOL of Pglogical replication support