plpgsql trigger - does it auto-acquire a lock?

From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: plpgsql trigger - does it auto-acquire a lock?
Date: 2005-05-24 00:43:55
Message-ID: 20050523214040.R61528@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Second part to the other question ... the function/trigger attempts to be
smart ... basically, it checks the updated record to see if there has been
any changes that warrant updating the tsearch2 index, and only does it if
it needs to ...

Apparently, even if there are no changes, the Lock is being acquired ...
kinda like what would happen if you were doing a SELECT * FROM <table> FOR
UPDATE; inside of a transaction in order to lock the table ... but, there
is nothing in the trigger that is, in fact, doing this ...

Is there something special about a trigger that auto-acquires this sort of
lock? If so, anywhere in the docs that mentions this that I should be
reading through?

Thanks ...

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy(at)hub(dot)org Yahoo!: yscrappy ICQ: 7615664

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2005-05-24 01:47:57 Re: Speeding up the Postgres lexer
Previous Message Marc G. Fournier 2005-05-24 00:40:36 Deadlocks in 7.4.x ...