Re: [Robert.Hufsky@ser.at: autocommit in ecpg]

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Michael Meskes <meskes(at)postgresql(dot)org>
Cc: PostgreSQL Hacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [Robert.Hufsky@ser.at: autocommit in ecpg]
Date: 2002-01-18 20:32:20
Message-ID: 200201182032.g0IKWKW12846@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


OK, I have added this information to the ecpg and ref/ecpg manual pages
as appropriate. Let me know if I should add anything else. I also
removed a comment from the bottom of ref/sgml that didn't make any sense.

---------------------------------------------------------------------------

Michael Meskes wrote:
> I just got this explanation for the autocommit setting. Maybe we should add
> thsi to the docs.
>
> ----- Forwarded message from Robert Hufsky <Robert(dot)Hufsky(at)ser(dot)at> -----
>
> From: "Robert Hufsky" <Robert(dot)Hufsky(at)ser(dot)at>
> To: "Michael Meskes" <meskes(at)debian(dot)org>
> Subject: autocommit in ecpg
> Date: Fri, 18 Jan 2002 08:21:17 +0100
>
> [...]
>
> Transaction Control and Autocommit
> An application can be operating in "autocommit on" or "autocommit off" mode.
> The mode can be selected by issuing
>
> exec sql set autocommit to on; or
> exec sql set autocommit to off;
>
> Autocommit Off
>
> In this mode, no sql statement is ever committed unless explicitly stated by
>
> exec sql commit;
>
> >From the beginning of a database session an implicit transaction is open.
> Each SQL statement that is issued is part of the transaction. The
> transaction is closed and work is committed by exec sql commit;.
>
> Immediately after the exec sql commit; statement a new transaction is opened
> and the same rules apply.
>
> Note that an exec sql begin; statement is not applicable in "autocommit off"
> mode.
>
> Autocommit On
>
> In this mode, each statement is automatically committed. This can be
> convinient but it also can lead to performance problems as each implicit
> commit may cause a disk write operation.
>
> Even in "autocommit on" mode, multi-statememt transactions can be achieved
> by placing multiple SQL statements between
>
> exec sql begin;
> and
> exec sql commit;
>
> [...]
> ----- End forwarded message -----
>
> Michael
> --
> Michael Meskes
> Michael(at)Fam-Meskes(dot)De
> Go SF 49ers! Go Rhein Fire!
> Use Debian GNU/Linux! Use PostgreSQL!
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Attachment Content-Type Size
unknown_filename text/plain 4.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-01-18 20:59:46 Re: More problem with scripts
Previous Message Doug McNaught 2002-01-18 20:27:32 Re: Text Column limits