pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Transactions and Locks writing in PLPGSQL
3+ messages / 3 participants
[nested] [flat]

* Transactions and Locks writing in PLPGSQL
@ 2001-06-13 09:39 Allan Kamau <hugebirdwings@yahoo.com>
  2001-06-14 05:49 ` Re: Transactions and Locks writing in PLPGSQL Anatoly K. Lasareff <tolik@aaanet.ru>
  0 siblings, 1 reply; 3+ messages in thread

From: Allan Kamau @ 2001-06-13 09:39 UTC (permalink / raw)
  To: pgsql-admin

Hi all,
How do I write transaction statements like 'BEGIN
WORK'... in PLPGSQL.
Also how do I write lock statements in the same.
Thank you in advance.

Allan Kamau


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



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

* Re: Transactions and Locks writing in PLPGSQL
  2001-06-13 09:39 Transactions and Locks writing in PLPGSQL Allan Kamau <hugebirdwings@yahoo.com>
@ 2001-06-14 05:49 ` Anatoly K. Lasareff <tolik@aaanet.ru>
  2001-06-14 07:52   ` Re: Transactions and Locks writing in PLPGSQL Sébastien HEITZMANN <2le@2le.net>
  0 siblings, 1 reply; 3+ messages in thread

From: tolik@aaanet.ru @ 2001-06-14 05:49 UTC (permalink / raw)
  To: Allan Kamau <hugebirdwings@yahoo.com>; +Cc: pgsql-admin

>>>>> "AK" == Allan Kamau <hugebirdwings@yahoo.com> writes:

 AK> Hi all,
 AK> How do I write transaction statements like 'BEGIN
 AK> WORK'... in PLPGSQL.
 AK> Also how do I write lock statements in the same.
 AK> Thank you in advance.

 AK> Allan Kamau

There is no possibility for this. See (from manual): 

(3) You also cannot have transactions in PL/pgSQL procedures. The
entire function (and other functions called from 
    therein) is executed in a transaction and PostgreSQL rolls back
the results if something goes wrong. Therefore 
    only one BEGIN statement is allowed. 

-- 
Anatoly K. Lasareff                 Email:    tolik@aaanet.ru 
                             http://tolikus.hq.aaanet.ru:8080



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

* Re: Transactions and Locks writing in PLPGSQL
  2001-06-13 09:39 Transactions and Locks writing in PLPGSQL Allan Kamau <hugebirdwings@yahoo.com>
  2001-06-14 05:49 ` Re: Transactions and Locks writing in PLPGSQL Anatoly K. Lasareff <tolik@aaanet.ru>
@ 2001-06-14 07:52   ` Sébastien HEITZMANN <2le@2le.net>
  0 siblings, 0 replies; 3+ messages in thread

From: Sébastien HEITZMANN @ 2001-06-14 07:52 UTC (permalink / raw)
  To: Allan Kamau <hugebirdwings@yahoo.com>; Anatoly K. Lasareff <tolik@aaanet.ru>; +Cc: pgsql-admin

And what happen when the function call an other function. Does this action
also be rolled back if the first fail ?

SEB

----- Original Message -----
From: "Anatoly K. Lasareff" <tolik@aaanet.ru>
To: "Allan Kamau" <hugebirdwings@yahoo.com>
Cc: <pgsql-admin@postgresql.org>
Sent: Thursday, June 14, 2001 7:49 AM
Subject: Re: [ADMIN] Transactions and Locks writing in PLPGSQL


> >>>>> "AK" == Allan Kamau <hugebirdwings@yahoo.com> writes:
>
>  AK> Hi all,
>  AK> How do I write transaction statements like 'BEGIN
>  AK> WORK'... in PLPGSQL.
>  AK> Also how do I write lock statements in the same.
>  AK> Thank you in advance.
>
>  AK> Allan Kamau
>
> There is no possibility for this. See (from manual):
>
> (3) You also cannot have transactions in PL/pgSQL procedures. The
> entire function (and other functions called from
>     therein) is executed in a transaction and PostgreSQL rolls back
> the results if something goes wrong. Therefore
>     only one BEGIN statement is allowed.
>
> --
> Anatoly K. Lasareff                 Email:    tolik@aaanet.ru
>                              http://tolikus.hq.aaanet.ru:8080
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>




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


end of thread, other threads:[~2001-06-14 07:52 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-06-13 09:39 Transactions and Locks writing in PLPGSQL Allan Kamau <hugebirdwings@yahoo.com>
2001-06-14 05:49 ` Anatoly K. Lasareff <tolik@aaanet.ru>
2001-06-14 07:52   ` Sébastien HEITZMANN <2le@2le.net>

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