From: | "Jean-Yves F(dot) Barbier" <12ukwn(at)gmail(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: AUTO COMMIT |
Date: | 2010-06-28 18:23:06 |
Message-ID: | 20100628202306.118ac505@anubis.defcon1 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Le Mon, 28 Jun 2010 15:56:51 +0100,
Atif Jung <atifjung(at)gmail(dot)com> a écrit :
...
> "In the default mode, statements are committed only when EXEC SQL COMMIT
> is issued. The embedded SQL interface also supports autocommit of
> transactions (similar to libpq behavior) via the -t command-line option
> to ecpg (see below) or via the EXEC SQL SET AUTOCOMMIT TO ON statement.
> In autocommit mode, each command is automatically committed unless it is
> inside an explicit transaction block. This mode can be explicitly turned
> off using EXEC SQL SET AUTOCOMMIT TO OFF."
>
> I've used the -t command-line option when compiling my code, and
> AUTOCOMMIT is set, but I still get the following error message when
> declaring a cursor:
>
> DECLARE CURSOR can only be used in transaction blocks.
>
> What am I doing wrong?
autocommit means *every* line is begin/commit (or fails).
--
QOTD:
"He's so egotistical he yells his own name when he comes."
From | Date | Subject | |
---|---|---|---|
Next Message | raghu ram | 2010-06-28 21:32:03 | Prepared statement issue in Pgpool-II |
Previous Message | Tom Lane | 2010-06-28 18:08:55 | Re: Postgre Protocol |