X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=psql%2Fpsqlrc.in;h=ad37eaced6d8c98880030f2591f2820318cb9865;hb=d7e6aec0ed3bc22af199bbb4c69a22fd607b691b;hp=8901fbfcab96c470bb0ae4ad01cc1f5d5cacc911;hpb=8fac741a66fb10d3389f116daa52722ea0745b82;p=config%2Fdotfiles.git diff --git a/psql/psqlrc.in b/psql/psqlrc.in index 8901fbf..ad37eac 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 @@ -39,5 +44,11 @@ \set HISTFILE HISTFILE_PATH \set HISTSIZE 100000 +-- Add transaction status (%x) to prompt. +\set PROMPT1 '%x%/%R%# ' +-- Remove database from second prompt to make it easily distinguishable from +-- PROMPT1. +\set PROMPT2 '%x%R%# ' + -- But display the normal psql welcome message. \set QUIET off