Search Postgresql Archives

Re: define transaction within pg/psql. Necessary?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

--
  Richard Huxton
  Archonet Ltd

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux