Re: LOCK for non-tables
От | Dimitri Fontaine |
---|---|
Тема | Re: LOCK for non-tables |
Дата | |
Msg-id | 1B131979-EB62-472F-B1F7-C3F6C41D76D1@hi-media.com обсуждение исходный текст |
Ответ на | Re: LOCK for non-tables (Robert Haas <robertmhaas@gmail.com>) |
Список | pgsql-hackers |
Le 14 janv. 2011 à 20:08, Robert Haas <robertmhaas@gmail.com> a écrit : > On Fri, Jan 14, 2011 at 1:58 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > >> So it looks to me like there are at least two fixes other than the ones >> you enumerated: >> >> 1. Make NOWAIT a reserved word. Not good, but perhaps better than >> reserving all the different object type names. >> >> 2. Disallow the above abbreviated syntax; allow NOWAIT only after an >> explicit IN ... MODE phrase. This would probably break a couple of >> applications, but I bet a lot fewer than changing the longer-established >> parts of the command syntax would break. >> >> I think #2 might be the best choice here. +1 > > That strikes me as pretty unintuitive. I'd rather take the hit of > forcing people to write "LOCK TABLE foo" instead of just "LOCK foo" > than try to explain why they have to include "IN ACCESS EXCLUSIVE > MODE" if they want to stick "NOWAIT" on the end. However, I guess > it's a matter of opinion so... anyone else have an opinion? Since you ask, see above. :) -- dim
В списке pgsql-hackers по дате отправления: