Re: Re: Query precompilation? - Mailing list pgsql-general

From Dominic J. Eidson
Subject Re: Re: Query precompilation?
Date
Msg-id Pine.LNX.4.21.0102271549550.12003-100000@morannon.the-infinite.org
Whole thread Raw
In response to Re: Re: Query precompilation?  (Mario Weilguni <mweilguni@sime.com>)
List pgsql-general
On Tue, 27 Feb 2001, Mario Weilguni wrote:

> Thanks for the answer, but that's not disabling autocommit, it committing by
> hand. What I mean ist Oracle-behaviour --> everthing is a transaction and
> must be commited by "COMMIT". What I ment was something like "SET autocommit
> to OFF" or something like this.

Everything _is_ a transaction - the BEGIN ... COMMIT is implied, if you
don't wrap your SQL statements in BEGIN ... COMMIT.

Compare:

dominic=# INSERT INTO pages ( page_from, page_to, page_data ) VALUES ( 'Dominic', '555-1212', 'This is a test page');
INSERT 945129 1

[ This was one transaction ]
dominic=# SELECT count(*) FROM pages;
 count
-------
     1
(1 row)

[ This was the second transaction ]

... for a total of two transactions, as opposed to:

dominic=# BEGIN;
BEGIN
dominic=# INSERT INTO pages ( page_from, page_to, page_data ) VALUES ( 'Dominic', '555-1212', 'Test page number two.'
);
INSERT 945130 1
dominic=# SELECT count(*) FROM pages;
 count
-------
     2
(1 row)

dominic=# COMMIT;
COMMIT

[ This was just _one_ transaction ]


--
Dominic J. Eidson
                                        "Baruk Khazad! Khazad ai-menu!" - Gimli
-------------------------------------------------------------------------------
http://www.the-infinite.org/              http://www.the-infinite.org/~dominic/



pgsql-general by date:

Previous
From: "Mitch Vincent"
Date:
Subject: Re: Query precompilation? - Off topic
Next
From: will trillich
Date:
Subject: upgrade broke stuff, downgrade still broke