From: | Michael Meskes <meskes(at)postgresql(dot)org> |
---|---|
To: | William West <wwest(at)csc(dot)com> |
Cc: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: ECPG - Clarfication of '-t', 'autocommit', BEGIN? |
Date: | 2002-09-27 11:26:58 |
Message-ID: | 20020927112658.GA8723@feivel.credativ.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
On Thu, Sep 26, 2002 at 01:57:40PM -0400, William West wrote:
> The ecpg man page says that '-t' will turn autocommit 'on', that
> the default is that otherwise a 'commit' statement is needed to
> cause a 'commit'.
> ...
Which indeed is correct. "Autocommit" means that the mode is the same as
with for instance psql. Each statement is run inside its own transaction
and thus you do only need a "commit" if you specified a "begin" before.
Without "autocommit" the mode is equivalent to Oracle in that an
explicit transaction is started automatically and all you need to do is
issue a "commit" or "rollback" to end. After that a new transaction is
started immediately.
> Am I wrong in thinking that BEGIN-(set of commands)
> -COMMIT should be equivalent to 'start transaction
> -perform sequence of commands-commit result of
> sequence of commands'? Or does BEGIN become
> superfluous when running *without* -t? Could someone
> please clarify?
Yes, that's it. No need to say "begin" when not using "-t".
Michael
--
Michael Meskes
Michael(at)Fam-Meskes(dot)De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Parker | 2002-09-27 12:54:24 | Re: ecpg help |
Previous Message | Paul | 2002-09-26 18:25:59 | Is there Pg PPM module (perl, win32) ? |