[ADMIN] locking a table

2002-12-23 Thread Andreas Schmitz
Hello *, I just tried to lock a table in exclusive mode following the syntax provided by \h lock LOCK [ TABLE ] name [, ...] IN lockmode MODE and I get the following result: newsdb=# lock table dpa in lockmode 'exclusive'; ERROR: parser: parse error at or near lockmode at character 19

Re: [ADMIN] locking a table

2002-12-23 Thread Andreas Schmitz
On Monday 23 December 2002 18:35, Simone Tellini wrote: lock dpa in exclusive mode; thanks a lot. thats it. regards -andreas -- Andreas Schmitz - Phone +49 201 8501 318 Cityweb-Technik-Service-Gesellschaft mbH Friedrichstr. 12 - Fax +49 201 8501 104 45128 Essen - email [EMAIL PROTECTED]

Re: [ADMIN] locking a table

2002-12-23 Thread Andreas Schmitz
On Monday 23 December 2002 18:35, Simone Tellini wrote: On Mon, 23 Dec 2002 18:02:24 +0100 Andreas Schmitz [EMAIL PROTECTED] wrote: AS LOCK [ TABLE ] name [, ...] IN lockmode MODE [...] AS newsdb=# lock table dpa in lockmode 'exclusive'; AS ERROR: parser: parse error at or near lockmode at

Re: [ADMIN] locking a table

2002-12-23 Thread Tom Lane
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