Re: COMMIT in PostgreSQL - Mailing list pgsql-general

From Stephane Bortzmeyer
Subject Re: COMMIT in PostgreSQL
Date
Msg-id 20020719113007.GA21014@nic.fr
Whole thread Raw
In response to COMMIT in PostgreSQL  (stefan@extum.com)
Responses Re: COMMIT in PostgreSQL
List pgsql-general
On Sat, Jul 20, 2002 at 02:50:34PM +0300,
 stefan@extum.com <stefan@extum.com> wrote
 a message of 19 lines which said:

> I was running a script which does some INSERTS and UPDATE some
> table. I found that there is no need for COMMIT; After each
> statement the TABLE is immediately commited.

There is probably no BEGIN; in your script. Try:

BEGIN;

INSERT INTO Domains (name, tech_contact, admin_contact, billing_contact, owner)
  VALUES ('pasteur.eu', 1, 1, 1, 1);

INSERT INTO Domains (name, tech_contact, admin_contact, billing_contact, owner)
  VALUES ('postgresql.eu', 1, 1, 1, 1);

COMMIT;

pgsql-general by date:

Previous
From: "Sam Liddicott"
Date:
Subject: Re: COMMIT in PostgreSQL
Next
From: stefan@extum.com
Date:
Subject: Re: COMMIT in PostgreSQL