agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Alberto Benini <alberto.benini@tasgroup.eu>
To: pgsql-sql@lists.postgresql.org
Cc: cm <cm@tasgroup.eu>
Subject: PSQL: "\set ECHO all" doesn't work with "\o"
Date: Wed, 23 Feb 2022 19:18:14 +0100
Message-ID: <e0b4495abaa4c9bfeff2e75f6ae60e88@mail.gmail.com> (raw)

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

view thread (2+ messages)  latest in thread

Message-ID: <e0b4495abaa4c9bfeff2e75f6ae60e88@mail.gmail.com>
Permalink:  ../e0b4495abaa4c9bfeff2e75f6ae60e88@mail.gmail.com/
Also on:    postgresql.org/message-id/e0b4495abaa4c9bfeff2e75f6ae60e88@mail.gmail.com

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: alberto.benini@tasgroup.eu, pgsql-sql@lists.postgresql.org, cm@tasgroup.eu
  Subject: Re: PSQL: "\set ECHO all" doesn't work with "\o"
  In-Reply-To: <e0b4495abaa4c9bfeff2e75f6ae60e88@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox