Re: Complex transactions without using plPgSQL Functions. It is possible?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chris Angelico <rosuav(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Complex transactions without using plPgSQL Functions. It is possible?
Date: 2012-03-06 22:25:19
Message-ID: 21408.1331072719@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Chris Angelico <rosuav(at)gmail(dot)com> writes:
> As a side point: Is it possible to disable Postgres's default
> autocommit behavior and have it automatically open a transaction on
> connection and after commit/rollback? That's what I grew up on with
> DB2 - you do some work, then you commit, then you do more work, then
> you commit, but never have to say "and begin a transaction too".

In psql, see "\set AUTOCOMMIT off". In other frontends, it would depend
on the client-side code whether or how you can do that.

(We once made an attempt to provide this sort of behavioral option on
the server side; but it was a complete disaster from the client
compatibility standpoint, and was soon, um, rolled back.)

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Angelico 2012-03-06 22:48:04 Re: Complex transactions without using plPgSQL Functions. It is possible?
Previous Message Bartosz Dmytrak 2012-03-06 21:02:37 Re: Single server multiple databases - extension