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