psql: show only failed queries - Mailing list pgsql-hackers

From Pavel Stehule
Subject psql: show only failed queries
Date
Msg-id CAFj8pRAWyvFwKZHzJXNUVXskNE5dW4zU_U0GuZ88YLV9W1jSBQ@mail.gmail.com
Whole thread Raw
Responses Re: psql: show only failed queries  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
List pgsql-hackers
Hello

I was asked, how can be showed only failed queries in psql.

I am thinking, so it is not possible now. But implementation is very simple

What do you think about it?

bash-4.1$ psql postgres -v ECHO=error -f data.sql
INSERT 0 1
Time: 27.735 ms
INSERT 0 1
Time: 8.303 ms
psql:data.sql:3: ERROR:  value too long for type character varying(2)
insert into foo values('bbb');
Time: 0.178 ms
INSERT 0 1
Time: 8.285 ms
psql:data.sql:5: ERROR:  value too long for type character varying(2)
insert into foo values('ssssss');
Time: 0.422 ms

Regards

Pavel
Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: proposal: new long psql parameter --on-error-stop
Next
From: Simon Riggs
Date:
Subject: Re: ALTER TABLE lock strength reduction patch is unsafe