From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | Colin Gillespie <C(dot)Gillespie(at)newcastle(dot)ac(dot)uk> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: triggers, transactions and locks |
Date: | 2004-12-07 05:21:07 |
Message-ID: | 20041207052107.GA34780@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Mon, Dec 06, 2004 at 03:41:07PM -0000, Colin Gillespie wrote:
> Is there a way to use locks within a trigger? My example below gives the error:
> ERROR: unexpected error -8 in EXECUTE of query "BEGIN"
> CONTEXT: PL/pgSQL function "insert_into_t1" line 6 at execute statement
As Stephan Szabo already mentioned in response to your post in
pgsql-general, the problem isn't with the lock but rather with your
attempt to start and end a transaction within a function.
Can you tell us what you're trying to do? Why do you want to lock
the table but not hold the lock until the outer transaction ends?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
From | Date | Subject | |
---|---|---|---|
Next Message | Neil | 2004-12-07 05:39:37 | Re: message type 0x44 |
Previous Message | Tom Lane | 2004-12-07 05:13:05 | Re: message type 0x44 |