Re: COMMIT in PostgreSQL

From: Stephane Bortzmeyer <bortzmeyer(at)nic(dot)fr>
To: stefan(at)extum(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: COMMIT in PostgreSQL
Date: 2002-07-19 11:30:07
Message-ID: 20020719113007.GA21014@nic.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Jul 20, 2002 at 02:50:34PM +0300,
stefan(at)extum(dot)com <stefan(at)extum(dot)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;

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2002-07-19 11:37:35 Re: COMMIT in PostgreSQL
Previous Message Sam Liddicott 2002-07-19 11:24:10 Re: COMMIT in PostgreSQL