I know this question has been asked before. I am new to PostgreSQL and would like to turn off "autocommit" forever. After some research, I need to add "\set AUTOCOMMIT off" in the ~/.psqlrc file. Where do I find this file ~/.psqlrc? in directory /var/lib/pgsql/13/data/ I do not find it. I created it "vi ~/.psqlrc" and inserted the command \set AUTOCOMMIT, but it did not work. What is missing here? I would be very happy about any tip.
Many greetings, Ahmed
~/.psqlrccontents. Usecat ~/.psqlrcto print it on the console and copy-paste (do not type, it's easy to make typos) it in to the question. – vonPryz Jun 16 '22 at 09:33inserted the command \set AUTOCOMMIT, but...without theoffkeyword, so just made sure it's there. Anyway, what does\echo :AUTOCOMMITprint in a psql session? – vonPryz Jun 16 '22 at 10:40psql. At some point you will forget to close a transaction, and your database may be damaged. – Laurenz Albe Jun 16 '22 at 20:30