PSQL: "\set ECHO all" doesn't work with "\o"

From: Alberto Benini <alberto(dot)benini(at)tasgroup(dot)eu>
To: pgsql-sql(at)lists(dot)postgresql(dot)org
Cc: cm <cm(at)tasgroup(dot)eu>
Subject: PSQL: "\set ECHO all" doesn't work with "\o"
Date: 2022-02-23 18:18:14
Message-ID: e0b4495abaa4c9bfeff2e75f6ae60e88@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi all,

I haven’t understand how to redirect SQL errors on output file.

Our goal is to have a psql script with:

\set ON_ERROR_STOP true

\set ECHO all

\o log/update.log;

\i update.sql;

..but in the log file we don’t see any sql error

KR,

Alberto

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message David G. Johnston 2022-02-23 18:27:08 Re: PSQL: "\set ECHO all" doesn't work with "\o"
Previous Message Shaozhong SHI 2022-02-21 19:54:31 Re: automatic scan a table, report on data formats in columns