-----Original Message-----
From: Tom Lane [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 23, 2002 11:32 AM
To: [EMAIL PROTECTED]
Cc: Simone Tellini; [EMAIL PROTECTED]
Subject: Re: [ADMIN] locking a table 


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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to