psql output result

From: Tiffany Thang <tiffanythang(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: psql output result
Date: 2018-03-15 14:57:05
Message-ID: CAB_W-NPNn8FR5GMbgmWmT=Ekf2um00ZZDTmR1KzeXuRCtnNeWg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I have a SQL script that does some DDLs, inserts and counts.

The command I ran is
psql dbname -c "\i crscript.sql" > output.txt

In output.txt, I got something like
INSERT 0 1
INSERT 0 1
CREATE TABLE
INSERT 0 2
count
-------
9
(1 row)

Is there a way to output the SQLs and DDLs so that I could easily identify
what statements were executed?

Thanks.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Geoff Winkless 2018-03-15 15:01:10 Re: psql output result
Previous Message Mike Rylander 2018-03-15 14:40:43 Change ON UPDATE behavior of fkey