Re: define transaction within pg/psql. Necessary?

From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: Antonio Goméz Soto <antonio(dot)gomez(dot)soto(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: define transaction within pg/psql. Necessary?
Date: 2010-02-18 10:06:46
Message-ID: 2f4958ff1002180206v1e3c3f49q81c548c7ed1c91cb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

all statements in postgresql are self contained transactions, and you cannot
change that.
To answer your question directly, you don't have to, it will all be a
transaction.

The best example of that is to run following query in psql:

CREATE TEMP TABLE foo() ON COMMIT DROP;

the table will not exists anymore after running it. Precisely because it was
'automatically' wrapped in begin/commit, and dropped at the end of it.

hth

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2010-02-18 10:07:26 Re: define transaction within pg/psql. Necessary?
Previous Message Richard Huxton 2010-02-18 10:04:50 Re: Define permissions at database level