Re: LOCK for non-tables
От | Dimitri Fontaine |
---|---|
Тема | Re: LOCK for non-tables |
Дата | |
Msg-id | m2mxn0a78q.fsf@2ndQuadrant.fr обсуждение исходный текст |
Ответ на | Re: LOCK for non-tables (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
Tom Lane <tgl@sss.pgh.pa.us> writes: > Another possibility is to disallow just the single case > LOCK tablename NOWAIT > ie, you can write NOWAIT if you include *either* the object type > or the IN...MODE clause. This is not too hard as far as the grammar > is concerned, but I'm not exactly sure how to document it. I don't see anything better than documenting it using 2 extra lines: LOCK [ TABLE ] [ ONLY ] name [, ...] [ IN lockmode MODE ] LOCK TABLE tablename [ IN lockmode MODE ] [ NOWAIT ] LOCK [ TABLE] [ ONLY ] tablename IN lockmode MODE [ NOWAIT ] Ok it looks like a mess, but that's what it is :) And every user with "LOCK tablename NOWAIT" in their code would have to change that to "LOCK TABLE tablename NOWAIT". Is there no way to reduce that to only be a problem with tables named the same as the new objects we want to add support for? Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
В списке pgsql-hackers по дате отправления: