Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nMwDZ-0003rZ-NR for pgsql-sql@arkaria.postgresql.org; Wed, 23 Feb 2022 18:18:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nMwDY-0001Bz-63 for pgsql-sql@arkaria.postgresql.org; Wed, 23 Feb 2022 18:18:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nMwDX-00019M-Pd for pgsql-sql@lists.postgresql.org; Wed, 23 Feb 2022 18:18:23 +0000 Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nMwDS-0003Ul-1k for pgsql-sql@lists.postgresql.org; Wed, 23 Feb 2022 18:18:22 +0000 Received: by mail-il1-x12a.google.com with SMTP id f2so4502353ilq.1 for ; Wed, 23 Feb 2022 10:18:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tasgroup.eu; s=google; h=from:mime-version:thread-index:date:message-id:subject:to:cc; bh=MOfQRwPHUKBS9BbUUzToKCye1gHWkrlWoyllVa9AMW0=; b=YbFy/cJzfSWUiCYjqUpCeNXYGyYg2KC5nmiGNrmjsW3jHnzOWcggaZJN6nWjOFFzzg nn+720a5IVWTA1Ob+Rn1uZJ0a+DTrNzpALp5O3JSIvN/xY5neRYanUPpGT5Yu9tfgs60 jdPTUfzZ2+ods5GCA+J3qGLgVzkbDSXt1F5qCqLy/2e+2kuBGRrpyJnNaXhTa9g0JbGE xyfDTXf2SfeEV0WKwcwnXKWqcCor+V7fJIdYAijqGJ0iqo2jQV7CFB9u8sirUl5+mLDw i2sPJiEGSjl2aFBWIU44NITWjt1EoLsydkuTumOqDs0pmaD/VwDn7obCgrlR9jiI3x/K cm8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:mime-version:thread-index:date:message-id :subject:to:cc; bh=MOfQRwPHUKBS9BbUUzToKCye1gHWkrlWoyllVa9AMW0=; b=xIoZ3T2GycFrNDTNPSfAdYTGKn3VX+UoDTlNa2XsYI7N84AbZajwvW7iF3al71CeHC l1tFlfAONwZkcXC0osWmo8NVhMT26qw7DOVlldgD7LaEhzVKekiJ6PGLoLveYdlyHtmd j7Vjt7vDUHQC2JzPaBaJzOS2EoLc2VLs912tR1vQPicxOH6dXvelzjx7dffFeZRpuDgx 0V+emXrHiiZSvTN8/FsMBAXxtDJ+qzcWfJcU7JdF6kwygCqP+vaPQmF3JLLqM4GLsT0L 0Yayviq7yEyMRvBAy1IzDtpvxJhU4R35w267NNaYyQ6HCH4t36Y7FoSUYsoNCK+zlIdS Z3ew== X-Gm-Message-State: AOAM5334bMun6Nb9BcMWfs3eesFYYKE15yVsUWwUJzlAOYLKxqlnhjTW lFqQnbkEl0rUbmU8jmstACHgLseZI+euzEvoLOO0ppkg8UE= X-Google-Smtp-Source: ABdhPJwcVXJs+dTmL57+z/c6dDwcOObSCUBsdralrpctBVUeAUgjKIX1ECLldS32fqDwiQxlXh+bPLa1ex/lPN/RZLQ= X-Received: by 2002:a92:c5c1:0:b0:2c2:8aeb:6570 with SMTP id s1-20020a92c5c1000000b002c28aeb6570mr760240ilt.162.1645640296648; Wed, 23 Feb 2022 10:18:16 -0800 (PST) From: Alberto Benini MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: Adgo4CM+yYk4vz6xSNWOlfePVm27+w== Date: Wed, 23 Feb 2022 19:18:14 +0100 Message-ID: Subject: PSQL: "\set ECHO all" doesn't work with "\o" To: pgsql-sql@lists.postgresql.org Cc: cm Content-Type: multipart/alternative; boundary="0000000000004f6c7705d8b37d51" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000004f6c7705d8b37d51 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi all, I haven=E2=80=99t 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=E2=80=99t see any sql error KR, Alberto --0000000000004f6c7705d8b37d51 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hi all,=

I haven=E2=80=99t un= derstand how to redirect SQL errors on output file.

=C2=A0

Our goal is to have a psql script with:

=C2=A0

\set ON_ERROR_STOP true

\set ECHO all

\o = log/update.log;

\i update.sql;

=C2=A0

=C2=A0

= ..but in the log file we don=E2=80=99t see any sql error

=C2= =A0

KR,

Alberto

= =C2=A0

--0000000000004f6c7705d8b37d51--