Home > Archive > PostgreSQL Hacks > May 2005 > plpgsql trigger - does it auto-acquire a lock?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author plpgsql trigger - does it auto-acquire a lock?
Marc G. Fournier

2005-05-23, 8:25 pm


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@hub.org Yahoo!: yscrappy ICQ: 7615664

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com