Re: [HACKERS] Begin statement again

Поиск
Список
Период
Сортировка
От Michael Meskes
Тема Re: [HACKERS] Begin statement again
Дата
Msg-id 199803251449.PAA16530@gauss.topsystem.de
обсуждение исходный текст
Ответ на Re: [HACKERS] Begin statement again  (Zeugswetter Andreas <andreas.zeugswetter@telecom.at>)
Список pgsql-hackers
Zeugswetter Andreas writes:
> I meant: why is a transaction always open in an ecpg program

Because this is how it works with other embedded SQL systems too. I have
done quite some work with Oracle, and it always has the transaction open.

Keep in mind that there is no disconnect command. Instead you go out by
issuing a commit.

> Yes, but this is handeled implicitly by the backend even if the user does not say
> begin work;
> blabla
> commit work;
> In that sense every statement is atomic.
>
> In a client server environment the implicit begin work; commit work; can save
> a lot of time since it saves 2 network roundtrips.
> And of course it would be bad practice if the user is forced to do commit work;
> and then for ease of programming and execution speed only does this every 100 statements.
>
> What I am saying here is, that an ecpg program should be able to run with
> autocommit mode on.  (Michael Meskes)

I tend to agree. But all embedded SQL programs I've seen so far only use
commit. I never saw one that issues a begin work since I stopped using
Ingres.

Michael

--
Dr. Michael Meskes, Project-Manager    | topsystem Systemhaus GmbH
meskes@topsystem.de                    | Europark A2, Adenauerstr. 20
meskes@debian.org                      | 52146 Wuerselen
Go SF49ers! Go Rhein Fire!             | Tel: (+49) 2405/4670-44
Use Debian GNU/Linux!                  | Fax: (+49) 2405/4670-10

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: AW: [HACKERS] Re: PostgreSQL reference manual
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: AW: [HACKERS] Re: PostgreSQL reference manual