Re: define transaction within pg/psql. Necessary? - Mailing list pgsql-general

From Antonio Goméz Soto
Subject Re: define transaction within pg/psql. Necessary?
Date
Msg-id 4B7D1645.3050003@gmail.com
Whole thread Raw
In response to Re: define transaction within pg/psql. Necessary?  (Richard Huxton <dev@archonet.com>)
List pgsql-general
Op 18-02-10 11:07, Richard Huxton schreef:
> On 18/02/10 10:02, Antonio Goméz Soto wrote:
>>
>> if I define a pg/pgsql function, and I call that outside a transaction,
>> does it create one for itself? Or should I add BEGIN and COMMIT
>> statements within
>> the function?
>
> You can't call a function outside a transaction. Every statement in
> PostgreSQL is inside a transaction, either one you define yourself, or
> an implicit one that just lasts for the duration of one statement.
>


Clear answer. Thanks.

Antonio

pgsql-general by date:

Previous
From: dipti shah
Date:
Subject: Re: Define permissions at database level
Next
From: Richard Huxton
Date:
Subject: Re: Define permissions at database level