From: Simon Ruderich Date: Wed, 5 Jul 2017 08:05:38 +0000 (+0200) Subject: psql: don't abort transactions in interactive mode on error X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=5e4f35caea5a091d8683cc18df59c561c3944fd4;p=config%2Fdotfiles.git psql: don't abort transactions in interactive mode on error --- diff --git a/psql/psqlrc.in b/psql/psqlrc.in index 8396dfd..bdf8e13 100644 --- a/psql/psqlrc.in +++ b/psql/psqlrc.in @@ -29,6 +29,11 @@ -- prevent mistaken them for an empty string. \pset null ï½¢NULLï½£ +-- Don't abort transactions in interactive mode when an error occurs. As the +-- error is displayed no information is lost and this saves one from having to +-- restart the transaction on a typo in a statement. +\set ON_ERROR_ROLLBACK interactive + -- Uppercase keywords when completing. Thanks to [1] (read on 2016-08-06). -- [1]: http://phili.pe/posts/postgresql-on-the-command-line/ \set COMP_KEYWORD_CASE upper