pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Marcelo Sena <marceloslacerda@gmail.com>
To: pgsql-docs@postgresql.org
Subject: Re: Behaviour of sql language function
Date: Thu, 26 Apr 2012 15:53:36 -0500
Message-ID: <4F996F80020000250004741C@gw.wicourts.gov> (raw)
In-Reply-To: <CAPmRTtN_bY5v4K8hU2+aMLcFOUZE_PaPaAiVfBDT-E8su3xfzg@mail.gmail.com>
References: <CAPmRTtN_bY5v4K8hU2+aMLcFOUZE_PaPaAiVfBDT-E8su3xfzg@mail.gmail.com>

Marcelo Sena <marceloslacerda@gmail.com> wrote:
 
> So, is it documented somewhere?
 
http://www.postgresql.org/docs/current/static/tutorial-transactions.html
 
| PostgreSQL actually treats every SQL statement as being executed
| within a transaction. If you do not issue a BEGIN command, then
| each individual statement has an implicit BEGIN and (if
| successful) COMMIT wrapped around it.
 
Combine this with the fact that a function can only run in the
context of a command, like:
 
    SELECT func_name();
 
You have your guarantee -- as long as you understand the possible
action of subtransactions (like savepoints).
 
-Kevin



view thread (3+ messages)  latest in thread

Message-ID: <4F996F80020000250004741C@gw.wicourts.gov>
Permalink:  ../4F996F80020000250004741C@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4F996F80020000250004741C@gw.wicourts.gov

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, marceloslacerda@gmail.com
  Subject: Re: Behaviour of sql language function
  In-Reply-To: <4F996F80020000250004741C@gw.wicourts.gov>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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