pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
transactions and ecpg
2+ messages / 2 participants
[nested] [flat]

* transactions and ecpg
@ 2012-09-22 17:34  Wayne Cuddy <lists-pgsql@useunix.net>
  0 siblings, 1 reply; 2+ messages in thread

From: Wayne Cuddy @ 2012-09-22 17:34 UTC (permalink / raw)
  To: pgsql-sql

I'm looking at some code that a coworker ported from Informix to
Postgres 9.0. The Informix database did not have transaction logging
enabled thus no begins/aborts/commits/rollbacks where in the original
code. The way the code has been ported there are still no begin
statements in the code, only commit and rollback after data changing
statements are executed.

Question 1: After a commit/rollback does the next SQL statement
implicitly begin a transaction?

Question 2: If we're just examining data via SELECT statements should we
be issuing COMMIT statements after or are they only required for data
modifying operations?

Thanks in advance,
Wayne




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: transactions and ecpg
@ 2012-09-23 07:29  Dmitriy Igrishin <dmitigr@gmail.com>
  parent: Wayne Cuddy <lists-pgsql@useunix.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Dmitriy Igrishin @ 2012-09-23 07:29 UTC (permalink / raw)
  To: pgsql-sql

Hey Wayne

2012/9/22 Wayne Cuddy <lists-pgsql@useunix.net>

> I'm looking at some code that a coworker ported from Informix to
> Postgres 9.0. The Informix database did not have transaction logging
> enabled thus no begins/aborts/commits/rollbacks where in the original
> code. The way the code has been ported there are still no begin
> statements in the code, only commit and rollback after data changing
> statements are executed.
>
> Question 1: After a commit/rollback does the next SQL statement
> implicitly begin a transaction?
>
Please, read http://www.postgresql.org/docs/9.2/static/sql-begin.html

>
> Question 2: If we're just examining data via SELECT statements should we
> be issuing COMMIT statements after or are they only required for data
> modifying operations?
>
Please, read http://www.postgresql.org/docs/9.2/static/transaction-iso.html

>
> Thanks in advance,
> Wayne
>

-- 
// Dmitriy.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2012-09-23 07:29 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-09-22 17:34 transactions and ecpg Wayne Cuddy <lists-pgsql@useunix.net>
2012-09-23 07:29 ` Dmitriy Igrishin <dmitigr@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox