X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 918F9B43A45 for ; Thu, 3 Jul 2003 15:59:31 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 30887-07 for ; Thu, 3 Jul 2003 12:59:25 -0300 (ADT) Received: from www.postgresql.com (www.postgresql.com [64.117.225.209]) by svr1.postgresql.org (Postfix) with ESMTP id 61CC4B43A37 for ; Thu, 3 Jul 2003 12:58:26 -0300 (ADT) Received: from wolff.to (wolff.to [66.93.249.74]) by www.postgresql.com (Postfix) with SMTP id B79CACF65BD for ; Thu, 3 Jul 2003 08:16:30 -0300 (ADT) Received: (qmail 19482 invoked by uid 500); 3 Jul 2003 11:19:17 -0000 Date: Thu, 3 Jul 2003 06:19:17 -0500 From: Bruno Wolff III To: Chris Schneider Cc: info@pgsql.com, pgsql-sql@postgresql.org Subject: Re: Inquiry From Form [pgsql] Message-ID: <20030703111917.GA19441@wolff.to> Mail-Followup-To: Chris Schneider , info@pgsql.com, pgsql-sql@postgresql.org References: <20030702192609.7DC8C6BDDEB@hub.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030702192609.7DC8C6BDDEB@hub.org> User-Agent: Mutt/1.5.4i X-Archive-Number: 200307/46 X-Sequence-Number: 14160 On Wed, Jul 02, 2003 at 16:26:09 -0300, Chris Schneider wrote: > I know this is basic, but couldn\'t find and in a hurry to know the answer. When interfacing with PostgreSQL through PSQL, it appears that DML statements are auto-commited, that is, a change I make in one session is seen from another without the original session issueing a COMMIT. Is this a result of PSQL interface and if so, can it be turned off. Is PostgreSQL transactional in the sense that I can issue several DMLs and then ROLLBACK. If so, how. Thanks and sorry for the newbie question. Autocommit is the default mode for psql. Use "begin;" to start a transaction. And use "end;" to end a transaction. Note that unlike in sqlplus with Oracle, any errors while in the transaction will abort it and you have to start over. All DML and most DDL statements are rollbackable by 7.3. I believe in 7.4 all DDL statements will be rollbackable.