Thanks to visit codestin.com
Credit goes to postgrespro.com

Re: locking a table - Mailing list pgsql-admin

From Tom Lane
Subject Re: locking a table
Date
Msg-id [email protected]
Whole thread Raw
In response to Re: locking a table  (Andreas Schmitz <[email protected]>)
List pgsql-admin
Andreas Schmitz <[email protected]> writes:
> Maybe I have a different idea of exclusive.

Locks are held till the end of the current transaction ... so you need
something like

    begin;
    lock ...;
    do whatever ...;
    commit;

to do anything useful with an explicit lock.  A standalone LOCK command
will drop the lock as soon as it's acquired.

            regards, tom lane

pgsql-admin by date:

Previous
From: Radoslaw Stachowiak
Date:
Subject: Re: SSL Mode
Next
From: Tom Lane
Date:
Subject: Re: SSL Mode