Re: begin-end? - Mailing list pgsql-general

From Doug McNaught
Subject Re: begin-end?
Date
Msg-id m3heokorzc.fsf@varsoon.denali.to
Whole thread Raw
In response to begin-end?  (Joep deVocht <joep@masktools.com>)
List pgsql-general
Joep deVocht <joep@masktools.com> writes:

> Hi,
>
> I've been reading the documentation but I need to be sure I
> understand correctly and am doing the right thing.
> Do I use "begin" and "end" if I want to lock the database
> so no user can do a transaction and mess up what I'm doing?
> (i.e. make the transactions between "begin" and "end" atomic to the
> other dbase users?)

Basically yes, but the transaction doesn't "lock" the database; the
other users just don't see the effects until you call "commit" (not
"end").  You can also call "rollback" instead of "commit" and it will
undo everything you did since the last "begin".

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
   --T. J. Jackson, 1863

pgsql-general by date:

Previous
From: Joep deVocht
Date:
Subject: begin-end?
Next
From: Holger Marzen
Date:
Subject: Re: CharSet