David Rowley wrote: > The only notes I can think to leave for the commiter would be around the > precedence order of the lock policy, especially around a query such as: > > SELECT * FROM (SELECT * FROM a FOR UPDATE SKIP LOCKED) a FOR UPDATE; -- > skip locked wins > > Of course the current behaviour is that NOWAIT wins over the standard FOR > UPDATE, but with NOWAIT, there's only a chance of an error, there's no > chance of giving incorrect results.
Another option is to throw an error at parse analysis time if there is a conflict in the specified locking policies, as in the above case. Are there cases in which it would make sense to have one clause trump the other? It seems reasonable to have NOWAIT trump regular FOR UPDATE (as it already does), since, as you say, there's chance of error being thrown at runtime, but not of incorrect result. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers