pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problem commit in function
3+ messages / 3 participants
[nested] [flat]

* Problem commit in function
@ 2008-04-07 12:30 luke.78@libero.it <luke.78@libero.it>
  2008-04-07 12:36 ` Re: Problem commit in function Pavan Deolasee <pavan.deolasee@gmail.com>
  2008-04-07 13:36 ` Re: Problem commit in function Craig Ringer <craig@postnewspapers.com.au>
  0 siblings, 2 replies; 3+ messages in thread

From: luke\.78\@libero\.it @ 2008-04-07 12:30 UTC (permalink / raw)
  To: pgsql-sql

Hi,
I need to execute COMMIT in a function pgsql,
there is a way?
Can I have any example?

Thanks in advance.

Luke.




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Problem commit in function
  2008-04-07 12:30 Problem commit in function luke.78@libero.it <luke.78@libero.it>
@ 2008-04-07 12:36 ` Pavan Deolasee <pavan.deolasee@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Pavan Deolasee @ 2008-04-07 12:36 UTC (permalink / raw)
  To: luke.78@libero.it <luke.78@libero.it>; +Cc: pgsql-sql

On Mon, Apr 7, 2008 at 6:00 PM, luke.78@libero.it <luke.78@libero.it> wrote:
> Hi,
>  I need to execute COMMIT in a function pgsql,
>  there is a way?
>

No. Transaction control statements like COMMIT/ROLLBACK/SAVEPOINT
are not supported inside plpgsql functions.

If you can tell us what you are trying to do, somebody may help you
with that.

Thanks,
Pavan

-- 
Pavan Deolasee
EnterpriseDB http://www.enterprisedb.com



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Problem commit in function
  2008-04-07 12:30 Problem commit in function luke.78@libero.it <luke.78@libero.it>
@ 2008-04-07 13:36 ` Craig Ringer <craig@postnewspapers.com.au>
  1 sibling, 0 replies; 3+ messages in thread

From: Craig Ringer @ 2008-04-07 13:36 UTC (permalink / raw)
  To: luke.78@libero.it <luke.78@libero.it>; +Cc: pgsql-sql

luke.78@libero.it wrote:
> Hi,
> I need to execute COMMIT in a function pgsql,
> there is a way?
>   
A function runs in a transaction. It cannot, as far as I know, commit one.

Why do you need to do that, anyway? What're you trying to achieve?

--
Craig Ringer



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2008-04-07 13:36 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-04-07 12:30 Problem commit in function luke.78@libero.it <luke.78@libero.it>
2008-04-07 12:36 ` Pavan Deolasee <pavan.deolasee@gmail.com>
2008-04-07 13:36 ` Craig Ringer <craig@postnewspapers.com.au>

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