Thread: LOCK has IGNORED on trigger.

LOCK has IGNORED on trigger.

From
"Yudha Setiawan"
Date:
Dear Expert,
I got a trouble with LOCK on my table (Inquery table).
I've put the LOCK (using select bla.bla for update)
on trigger(trigger insert) of Table_A. It's work properly.
when i tried "insert into Table_A bla.bla.bla" with more
than 5 user in same time
 
   Code...fm_In...fm_Out..fm_Balance
   ---------------------------------
*   009    3       0       3
#   001    10      0       10
*   009    10      0       13
#   001    10      0       20
*   009    15      0       28
#   001    0       3       17
#   001    0       1       16
#   001    0       4       12
 
But when i put the "Insert into Table_A" command on
the other trigger's table. That's LOCK is ignored.
 
Somebody help me please...
 
GOD Bless You All and Bravo Postgre
-----------------------------------
Yudha Setiawan.
 
 

Re: LOCK has IGNORED on trigger.

From
Stephan Szabo
Date:
On Thu, 4 Sep 2003, Yudha Setiawan wrote:

> Dear Expert,
> I got a trouble with LOCK on my table (Inquery table).
> I've put the LOCK (using select bla.bla for update)
> on trigger(trigger insert) of Table_A. It's work properly.
> when i tried "insert into Table_A bla.bla.bla" with more
> than 5 user in same time
>
>    Code...fm_In...fm_Out..fm_Balance
>    ---------------------------------
> *   009    3       0       3
> #   001    10      0       10
> *   009    10      0       13
> #   001    10      0       20
> *   009    15      0       28
> #   001    0       3       17
> #   001    0       1       16
> #   001    0       4       12
>
> But when i put the "Insert into Table_A" command on
> the other trigger's table. That's LOCK is ignored.
>
> Somebody help me please...

You're probably going to need to provide a standalone example
since at least I'm not entirely trying to do.



Re: LOCK has IGNORED on trigger.

From
Bruno Wolff III
Date:
On Thu, Sep 04, 2003 at 13:59:21 +0700,
  Yudha Setiawan <yudha@bonbon.net> wrote:
> Dear Expert,
> I got a trouble with LOCK on my table (Inquery table).
> I've put the LOCK (using select bla.bla for update)
> on trigger(trigger insert) of Table_A. It's work properly.
> when i tried "insert into Table_A bla.bla.bla" with more
> than 5 user in same time
>
> But when i put the "Insert into Table_A" command on
> the other trigger's table. That's LOCK is ignored.

A select for update isn't going to block an insert. If you need that, you
have to lock the whole table.