Re: Redirect RAISE NOTICE and errors to separate log file

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Nikhil Ingale <niks(dot)bgm(at)gmail(dot)com>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Redirect RAISE NOTICE and errors to separate log file
Date: 2023-02-17 16:58:45
Message-ID: CAKFQuwYrx9dT_MJYUgOD20ELHE_U18xZwkkFbtzBiSW9ESUNng@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Fri, Feb 17, 2023 at 9:52 AM Nikhil Ingale <niks(dot)bgm(at)gmail(dot)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.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message pradeep pandey 2023-02-17 17:19:44 Re: EOL of Pglogical replication support
Previous Message Nikhil Ingale 2023-02-17 16:51:34 Re: Redirect RAISE NOTICE and errors to separate log file