Re: COMMIT in PostgreSQL - Mailing list pgsql-general

From stefan@extum.com
Subject Re: COMMIT in PostgreSQL
Date
Msg-id Pine.LNX.4.44.0207201500000.3777-100000@extum.com
Whole thread Raw
In response to Re: COMMIT in PostgreSQL  (Steve Brett <SBrett@e-mis.com>)
Responses Re: COMMIT in PostgreSQL
List pgsql-general

thanks a lot all for comments. So in PostgreSQL each query is a
transaction ?

Well the point was not to have a comparation with Oracle but to try
understanding the model what PostgreSQL does. It is interesting.

If you are under Oracle and say:

INSERT ...
UPDATE ...

and that's all another user will not see those updates if you don't COMMIT
the changes. After COMMIT all other users can see the changes.

In PostgreSQL the changes are visible as long as you run the query.

stefan


On Fri, 19 Jul 2002, Steve Brett wrote:

> AFAIAA each query sent to the backend is a transaction and is treated as
> such unless you explicitly send a BEGIN.
>
> If you send a BEGIN then you can send multiple INSERTS etc and then do a
> manual COMMIT.
>
> I've never used Oracle (as the comapny I work for can't afford it !) so I
> wouldn't be able to supply you with a comparison.
>
> Steve
>
> > -----Original Message-----
> > From: stefan@extum.com [mailto:stefan@extum.com]
> > Sent: 20 July 2002 12:51
> > To: pgsql-general@postgresql.org
> > Subject: [GENERAL] COMMIT in PostgreSQL
> >
> >
> >
> > Hey,
> >
> > 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. Other session via psql can sees ASAP
> > the changes to
> > the table. So it seems a bit different than Oracle's COMMIT .
> > Can somebody
> > explain me why this is so in PostgreSQL ?
> >
> > Are the modifications done without commit statement ?
> >
> > PostgreSQL looks really interesting and seems to be good SQL
> > compliant.
> > stefan
> >
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 6: Have you searched our list archives?
> >
> > http://archives.postgresql.org
> >
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>


pgsql-general by date:

Previous
From: Stephane Bortzmeyer
Date:
Subject: Re: COMMIT in PostgreSQL
Next
From: stefan@extum.com
Date:
Subject: Re: COMMIT in PostgreSQL