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 8C5C9B43A28 for ; Thu, 3 Jul 2003 16:19:23 +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 42394-04 for ; Thu, 3 Jul 2003 13:19:23 -0300 (ADT) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by svr1.postgresql.org (Postfix) with ESMTP id 787E4B439F4 for ; Thu, 3 Jul 2003 13:19:22 -0300 (ADT) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.9/8.12.9) with ESMTP id h63GIgVG021793; Thu, 3 Jul 2003 10:18:43 -0600 (MDT) Date: Thu, 3 Jul 2003 10:12:46 -0600 (MDT) From: "scott.marlowe" To: Bruno Wolff III Cc: Chris Schneider , , Subject: Re: Inquiry From Form [pgsql] In-Reply-To: <20030703111917.GA19441@wolff.to> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-MailScanner: Found to be clean X-MailScanner-SpamCheck: X-Archive-Number: 200307/47 X-Sequence-Number: 14161 On Thu, 3 Jul 2003, Bruno Wolff III wrote: > 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. Except drop database. That's one that'll probably never be rollbackable ;^)